def METHOD_NAME(expr):
    """Conglomerate together identical args x + x -> 2x."""
    groups = sift(arguments(expr), key)
    counts = {k: sum(map(count, args)) for k, args in groups.items()}
    newargs = [combine(cnt, mat) for mat, cnt in counts.items()]
    if set(newargs) != set(arguments(expr)):
        return term(operator(expr), newargs)
    return expr