'Evaluates the direct product.'

@classmethod
def eval(cls, args):

    new_args = []
    recall = False
    for arg in args:
        if isinstance(arg, DirectSumHilbertSpace):
            new_args.extend(arg.args)
            recall = True
        elif isinstance(arg, HilbertSpace):
            new_args.append(arg)
        else:
            raise TypeError(('Hilbert    spaces    can    only    be    summed    with    other                                                                    Hilbert    spaces:    %r' % arg))
    if recall:
        return DirectSumHilbertSpace(*new_args)
    else:
        return None
