code: def maximal(iterable, comparison=operator.lt, _groupkey=operator.itemgetter(0)):
      
      iterable = set(iterable)
      if len(iterable) < 2:
          return iterable
      return (item for item, pairs
          in groupby(permutations(iterable, 2), key=_groupkey)
          if not any(starmap(comparison, pairs)))
docs: Yield the unique maximal elements from ``iterable`` using ``comparison``.
  
      >>> list(maximal([1, 2, 3, 3]))
      [3]
  
      >>> list(maximal([1]))
      [1]