def METHOD_NAME(iterable, key=lambda x: x):
    """
    Analogous to ``max``, but returns a list of all maxima.
    >>> all(key(elem) == max(iterable, key=key) for elem in iterable)
    True
    Parameters
    ----------
    iterable: collections.abc.Iterable
        The iterable for which to find all maxima.
    key: collections.abc.Callable
        This callable will be called on each element of ``iterable`` to evaluate
        it to a value. Return values must support ``>`` and ``==``.
    Returns
    -------
    list
        A list of all maximal values.
    """
    max_key = None
    out = []
    for item in iterable:
        key_val = key(item)
        if max_key is None or key_val > max_key:
            out = [item]
            max_key = key_val
        elif key_val == max_key:
            out.append(item)
    return out