def METHOD_NAME(arg):
  if type(arg) == frozendict:
    return dict((k, METHOD_NAME(v)) for (k, v) in arg.iteritems())
  elif '__iter__' in dir(arg):
    return list( METHOD_NAME(v) for v in arg )
  else:
    return arg