def recursive_dict_to_dict(rdict):
    """ Convert a recursive dict to a plain ol' dict.
    """
    d = {}
    for (k, v) in rdict.items():
        if isinstance(v, defaultdict):
            d[k] = recursive_dict_to_dict(v)
        else:
            d[k] = v
    return d
Convert a recursive dict to a plain ol' dict.