code: def as_list(x):
      '''Ensure `x` is of list type.'''
      
      if x is None:
          x = []
      elif not isinstance(x, Sequence):
          x = [x]
      return list(xf as_list(x):
      '''Ensure `x` is of list type.'''
      
      if x is None:
          x = []
      elif not isinstance(x, Sequence):
          x = [x]
      return list(x)
docs: Ensure `x` is of list type.