@staticmethod
    def Pow(expr, assumptions):
        if expr.is_number:
            return AskImaginaryHandler._number(expr, assumptions)

        if expr.base.func == exp:
            if ask(Q.imaginary(expr.base.args[0]), assumptions):
                if ask(Q.imaginary(expr.exp), assumptions):
                    return False
                i = expr.base.args[0]/I/pi
                if ask(Q.integer(2*i), assumptions):
                    return ask(Q.imaginary(((-1)**i)**expr.exp), assumptions)

        if ask(Q.imaginary(expr.base), assumptions):
            if ask(Q.integer(expr.exp), assumptions):
                odd = ask(Q.odd(expr.exp), assumptions)
                if odd is not None:
                    return odd
                return

        if ask(Q.imaginary(expr.exp), assumptions):
            imlog = ask(Q.imaginary(log(expr.base)), assumptions)
            if imlog is not None:
                return False  # I**i -> real; (2*I)**i -> complex ==> not imaginary

        if ask(Q.real(expr.base) & Q.real(expr.exp), assumptions):
            if ask(Q.positive(expr.base), assumptions):
                return False
            else:
                rat = ask(Q.rational(expr.exp), assumptions)
                if not rat:
                    return rat
                if ask(Q.integer(expr.exp), assumptions):
                    return False
                else:
                    half = ask(Q.integer(2*expr.exp), assumptions)
                    if half:
                        return ask(Q.negative(expr.base), assumptions)
                    return half
Constructor.
dataset/ETHPy150Open sympy/sympy/sympy/assumptions/handlers/sets.py/AskImaginaryHandler.Pow--crossover with--dataset/ETHPy150Open mrjoes/flask-admin/flask_admin/form/rules.py/Macro.__init__