Useful functions for dealing with python's dictionaries