code: def test_perfect_power():
      raises(ValueError, lambda: perfect_power(0.1))
      assert perfect_power(0) is False
      assert perfect_power(1) is False
      assert perfect_power(2) is False
      assert perfect_power(3) is False
      assert perfect_power(4) == (2, 2)
      assert perfect_power(14) is False
      assert perfect_power(25) == (5, 2)
      assert perfect_power(22) is False
      assert perfect_power(22, [2]) is False
      assert perfect_power(137 ** (3 * 5 * 13)) == (137, 3 * 5 * 13)
      assert perfect_power(137 ** (3 * 5 * 13) + 1) is False
      assert perfect_power(137 ** (3 * 5 * 13) - 1) is False
      assert perfect_power(103005006004**7) == (103005006004, 7)
      assert perfect_power(103005006004**7 + 1) is False
      assert perfect_power(103005006004**7 - 1) is False
      assert perfect_power(103005006004**12) == (103005006004, 12)
      assert perfect_power(103005006004**12 + 1) is False
      assert perfect_power(103005006004**12 - 1) is False
      assert perfect_power(2**10007) == (2, 10007)
      assert perfect_power(2**10007 + 1) is False
      assert perfect_power(2**10007 - 1) is False
      assert perfect_power((9**99 + 1) ** 60) == (9**99 + 1, 60)
      assert perfect_power((9**99 + 1) ** 60 + 1) is False
      assert perfect_power((9**99 + 1) ** 60 - 1) is False
      assert perfect_power((10**40000) ** 2, big=False) == (
          10**40000,
          2,
      )
      assert perfect_power(10**100000) == (10, 100000)
      assert perfect_power(10**100001) == (10, 100001)
      assert perfect_power(13**4, [3, 5]) is False
      assert perfect_power(3**4, [3, 10], factor=0) is False
      assert perfect_power(3**3 * 5**3) == (15, 3)
      assert perfect_power(2**3 * 5**5) is False
      assert perfect_power(2 * 13**4) is False
      assert perfect_power(2**5 * 3**3) is False
      t = 2**24
      for d in divisors(24):
          m = perfect_power(t * 3**d)
          assert m and m[1] == d or d == 1
          m = perfect_power(t * 3**d, big=False)
          assert m and m[1] == 2 or d == 1 or d == 3, (d, m)
  
      # negatives and non-integer rationals
      assert perfect_power(-4) is False
      assert perfect_power(-8) == (-2, 3)
      assert perfect_power(Rational(1, 2) ** 3) == (S.Half, 3)
      assert perfect_power(Rational(-3, 2) ** 3) == (-3 * S.Half, 3)
  
imports: from sympy.concrete.summations import summation
  from sympy.core.containers import Dict
  from sympy.core.mul import Mul
  from sympy.core.power import Pow
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol
  from sympy.functions.combinatorial.factorials import factorial
  from sympy.core.numbers import Integer, Rational
  from sympy.external.gmpy import gcd
  from sympy.ntheory import totient, factorint, primefactors, divisors, nextprime, primerange, pollard_rho, perfect_power, multiplicity, multiplicity_in_factorial, divisor_count, primorial, pollard_pm1, divisor_sigma, factorrat, reduced_totient
  from sympy.ntheory.factor_ import smoothness, smoothness_p, proper_divisors, antidivisors, antidivisor_count, core, udivisors, udivisor_sigma, udivisor_count, proper_divisor_count, primenu, primeomega, mersenne_prime_exponent, is_perfect, is_abundant, is_deficient, is_amicable, dra, drm, _perfect_power
  from sympy.testing.pytest import raises, slow
  from sympy.utilities.iterables import capture
label_desc: Use image node_id 6 for calling a global function with example usage: test_perfect_power() without return types