'Check dimensions of arguments and linearity.'

def validate_arguments(self):

    if ((not self.args[0].is_affine()) or (not self.args[1].is_affine())):
        raise ValueError('The    arguments    to    affine_prod    must    be    affine.')
    u.shape.mul_shapes(self.args[0].size, self.args[1].size)
