def arg_to_iter(arg):
 if (arg is None):
  return []
 elif ((not isinstance(arg, dict)) and hasattr(arg, '__iter__')):
  return arg
 else:
  return [arg]

def arg_to_iter ( arg ) : if ( arg is None ) : return [ ] elif ( ( not isinstance ( arg , dict ) ) and hasattr ( arg , '__iter__' ) ) : return arg else : return [ arg ]
convert an argument to an iterable .