def invert_dictionary(dictionary, field='name'):
    return dict([[value[field], key]
                 for key, value in dictionary.items()])
Inverts a dictionary.
dataset/ETHPy150Open bigmlcom/python/bigml/util.py/invert_dictionary