code: def as_list(value):
      
      if isinstance(value, (list, tuple)):
          return value
      if not value:
          return []
      for c in '\n ':
          if c in value:
              value = value.split(c)
              return [v.strip() for v in value if v.strip()]
      return [value]
docs: clever string spliting:
  
      .. code-block:: python
  
          >>> print(as_list('value'))
          ['value']
          >>> print(as_list('v1 v2'))
          ['v1', 'v2']
          >>> print(as_list(None))
          []
          >>> print(as_list(['v1']))
          ['v1']