import itertools


def largest_group(iterable, key):
    """
    Find a group of largest elements (according to ``key``).

    >>> s = [-4, 3, 5, 7, 4, -7]
    >>> largest_group(s, abs)
    [7, -7]

    """
    it1, it2 = itertools.tee(iterable)
    max_key = max(map(key, it1))
    return [el for el in it2 if key(el) == max_key]