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