code: def coerce_to_list(items, preprocess=None):
      
      if not isinstance(items, list):
          items = [items]
      if preprocess:
          items = list(map(preprocess, items))
      return items
docs: Given an instance or list, coerce to list.
  
      With optional preprocessing.