code: def mpi_pow_int(s, n, prec):
      sa, sb = s
      if n < 0:
          return mpi_div(
              (fone, fone), mpi_pow_int(s, -n, prec + 20), prec
          )
      if n == 0:
          return (fone, fone)
      if n == 1:
          return s
      if n == 2:
          return mpi_square(s, prec)
      # Odd -- signs are preserved
      if n & 1:
          a = mpf_pow_int(sa, n, prec, round_floor)
          b = mpf_pow_int(sb, n, prec, round_ceiling)
      # Even -- important to ensure positivity
      else:
          sas = mpf_sign(sa)
          sbs = mpf_sign(sb)
          # Nonnegative?
          if sas >= 0:
              a = mpf_pow_int(sa, n, prec, round_floor)
              b = mpf_pow_int(sb, n, prec, round_ceiling)
          # Nonpositive?
          elif sbs <= 0:
              a = mpf_pow_int(sb, n, prec, round_floor)
              b = mpf_pow_int(sa, n, prec, round_ceiling)
          # Mixed signs?
          else:
              a = fzero
              # max(-a,b)**n
              sa = mpf_neg(sa)
              if mpf_ge(sa, sb):
                  b = mpf_pow_int(sa, n, prec, round_ceiling)
              else:
                  b = mpf_pow_int(sb, n, prec, round_ceiling)
      return a, b
  
imports: from .backend import xrange
  from .libmpf import ComplexResult, round_down, round_up, round_floor, round_ceiling, round_nearest, prec_to_dps, repr_dps, dps_to_prec, bitcount, from_float, fnan, finf, fninf, fzero, fhalf, fone, fnone, mpf_sign, mpf_lt, mpf_le, mpf_gt, mpf_ge, mpf_eq, mpf_cmp, mpf_min_max, mpf_floor, from_int, to_int, to_str, from_str, mpf_abs, mpf_neg, mpf_pos, mpf_add, mpf_sub, mpf_mul, mpf_mul_int, mpf_div, mpf_shift, mpf_pow_int, from_man_exp, MPZ_ONE
  from .libelefun import mpf_log, mpf_exp, mpf_sqrt, mpf_atan, mpf_atan2, mpf_pi, mod_pi2, mpf_cos_sin
  from .gammazeta import mpf_gamma, mpf_rgamma, mpf_loggamma, mpc_loggamma
label_desc: Use image node_id 25 for calling a global function with example usage: mpi_pow_int(s, n, prec) and returns: a,  b, mpi_div, fone,  fone, s, mpi_square