code: def to_iter(obj):
      
      if isinstance(obj, type(None)):
          return None
      elif isinstance(obj, six.string_types):
          return [obj]
      else:
          # Nesting here since symmetry is broken in isinstance checks.
          # Strings are iterables in python 3, so the relative order of if statements is important.
          if isinstance(obj, collections.Iterable):
              return obj
          else:
              return [obj]
docs: Convert an object to a list if it is not already an iterable.
  
      Nones are returned unaltered.
  
      This is an awful function that proliferates an explosion of types, please do not use anymore.