def sort_dict(unsorted_dict):
    sorted_dict = OrderedDict()
    # sort items before inserting them into a dict
    for key, value in sorted(unsorted_dict.items(), key=itemgetter(0)):
        sorted_dict[key] = value
    return sorted_dict
Return a OrderedDict ordered by key names from the :unsorted_dict:
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/core/utils.py/sort_dict