def walk_dict(d, depth=0):
    for k, v in sorted(list(d.items()), key=lambda x: x[0]):
        if isinstance(v, dict):
            pass
recursively traverse multidimensional dictionary, dimension unknown