<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def maximal(iterable, comparison=operator.lt, _groupkey=operator.itemgetter(0)):
 """Yield the unique maximal elements from ``iterable`` using ``comparison``. [3] [1] """

    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)))