>>> from Redy.Collections import Flow, Traversal
    >>> x = [1, 1, 2]
    >>> Flow(x)[Traversal.group].unbox

def group(seq: ActualIterable[T]) -> Dict[TR, List[T]]:
    """
    >>> from Redy.Collections import Flow, Traversal
    >>> x = [1, 1, 2]
    >>> Flow(x)[Traversal.group].unbox
    """
    ret = defaultdict(list)
    for each in seq:
        ret[each].append(each)
    return ret