Utility function to remove empty keys

remove_empty_keys(dict)

Arguments

dict

a flat or hierarchical dictionary