@classmethod
    def eval(cls, z, m=None):
        if m is not None:
            k = 2*z/pi
            if m.is_zero:
                return z
            if z.is_zero:
                return S.Zero
            elif k.is_integer:
                return k*elliptic_e(m)
            elif (S.Infinity, S.NegativeInfinity) in m:
                return S.ComplexInfinity
            elif z.could_extract_minus_sign():
                return -elliptic_e(-z, m)
        else:
            if z.is_zero:
                return pi/2
            elif z is S.One:
                return S.One
            elif z is S.Infinity:
                return I*S.Infinity
            elif z is S.NegativeInfinity:
                return S.Infinity
            elif z is S.ComplexInfinity:
                return S.ComplexInfinity
dataset/ETHPy150Open sympy/sympy/sympy/functions/special/elliptic_integrals.py/elliptic_e.eval/swapped operands of `in`