code: def iroot(y, n):
      if y < 0:
          raise ValueError("y must be nonnegative")
      if n < 1:
          raise ValueError("n must be positive")
      if y in (0, 1):
          return y, True
      if n == 1:
          return y, True
      if n == 2:
          x, rem = mlib.sqrtrem(y)
          return int(x), not rem
      if n >= y.bit_length():
          return 1, False
      # Get initial estimate for Newton's method. Care must be taken to
      # avoid overflow
      try:
          guess = int(y ** (1.0 / n) + 0.5)
      except OverflowError:
          exp = math.log2(y) / n
          if exp > 53:
              shift = int(exp - 53)
              guess = int(2.0 ** (exp - shift) + 1) << shift
          else:
              guess = int(2.0**exp)
      if guess > 2**50:
          # Newton iteration
          xprev, x = -1, guess
          while 1:
              t = x ** (n - 1)
              xprev, x = x, ((n - 1) * x + y // t) // n
              if abs(x - xprev) < 2:
                  break
      else:
          x = guess
      # Compensate
      t = x**n
      while t < y:
          x += 1
          t = x**n
      while t > y:
          x -= 1
          t = x**n
      return x, t == y
  
imports: import sys
  import math
  import mpmath.libmp
label_desc: Use image node_id 14 for calling a global function with example usage: iroot(y, n) and returns: x,  unknown, y,  True, y,  True, int,  unknown, int,  False