

def _contains(self, other):
    from sympy.functions import arg, Abs
    from sympy.core.containers import Tuple
    other = sympify(other)
    isTuple = isinstance(other, Tuple)
    if (isTuple and (len(other) != 2)):
        raise ValueError('expecting Tuple of length 2')
    if (not self.polar):
        (re, im) = (other if isTuple else other.as_real_imag())
        for element in self.psets:
            if And(element.args[0]._contains(re), element.args[1]._contains(im)):
                return True
        return False
    elif self.polar:
        if isTuple:
            (r, theta) = other
        elif other.is_zero:
            (r, theta) = (S.Zero, S.Zero)
        else:
            (r, theta) = (Abs(other), arg(other))
        for element in self.psets:
            if And(element.args[0]._contains(r), element.args[1]._contains(theta)):
                return True
            return False

dataset/ETHPy150Open sympy/sympy/sympy/sets/fancysets.py ComplexRegion._contains/original