docs: def flatten(l, unique=True):
      """flatten a list of lists
  
      Parameters
      ----------
      l          : list
                   of lists
      unique     : boolean
                   whether or not only unique items are wanted (default=True)
  
      Returns
      -------
      list
          of single items
  
      Examples
      --------
  
      Creating a sample list whose elements are lists of integers
  
      >>> l = [[1, 2], [3, 4, ], [5, 6]]
  
      Applying flatten function
  
      >>> flatten(l)
      [1, 2, 3, 4, 5, 6]
  
      """
      l = reduce(lambda x, y: x + y, l)
      if not unique:
          return list(l)
      return list(set(l))