@classmethod
def flatten(cls, seq):
    """Return seq so that none of the elements are of type `cls`. This is
        the vanilla routine that will be used if a class derived from AssocOp
        does not define its own flatten routine."""
    new_seq = []
    while seq:
        o = seq.pop()
        if o.__class__ is cls:
            seq.extend(o.args)
        else:
            new_seq.append(o)
    new_seq.reverse()
    return [], new_seq, None
