def __new__(cls, function, *symbols, **assumptions):
        obj = AddWithLimits.__new__(cls, function, *symbols, **assumptions)
        if not hasattr(obj, 'limits'):
            return obj
        if any(len(l) != 3 or l in None for l in obj.limits):
            raise ValueError('Sum requires values for lower and upper bounds.')

        return obj
dataset/ETHPy150Open sympy/sympy/sympy/concrete/summations.py/Sum.__new__/swapped operands of `in`