def METHOD_NAME(top):
    if isinstance(top, dict):
        return collections.OrderedDict(
            sorted(((k, METHOD_NAME(v)) for k, v in top.iteritems())))
    if isinstance(top, list):
        return [METHOD_NAME(e) for e in top]
    if isinstance(top, tuple):
        return tuple(METHOD_NAME(e) for e in top)
    return top