def METHOD_NAME(self, o, a, b):
    if a and b:
        # Check that we don't have test*test, trial*trial, even
        # for different parts in a block system
        anumbers = set(x[0].number() for x in a)
        for x in b:
            if x[0].number() in anumbers:
                raise ArityMismatch("Multiplying expressions with overlapping form argument number "
                                    f"{x[0].number()}, argument is {_afmt(x)}.")
        # Combine argument lists
        c = tuple(sorted(set(a + b), key=lambda x: (x[0].number(), x[0].part())))
        # Check that we don't have any arguments shared between a
        # and b
        if len(c) != len(a) + len(b) or len(c) != len({x[0] for x in c}):
            raise ArityMismatch("Multiplying expressions with overlapping form arguments "
                                f"{_afmt(a)} vs {_afmt(b)}.")
        # It's fine for argument parts to overlap
        return c
    elif a:
        return a
    else:
        return b