code: def mpf_zeta_int(s, prec, rnd=round_fast):
      """
      Optimized computation of zeta(s) for an integer s.
      """
      wp = prec + 20
      s = int(s)
      if s in zeta_int_cache and zeta_int_cache[s][0] >= wp:
          return mpf_pos(zeta_int_cache[s][1], prec, rnd)
      if s < 2:
          if s == 1:
              raise ValueError("zeta(1) pole")
          if not s:
              return mpf_neg(fhalf)
          return mpf_div(
              mpf_bernoulli(-s + 1, wp), from_int(s - 1), prec, rnd
          )
      # 2^-s term vanishes?
      if s >= wp:
          return mpf_perturb(fone, 0, prec, rnd)
      # 5^-s term vanishes?
      elif s >= wp * 0.431:
          t = one = 1 << wp
          t += 1 << (wp - s)
          t += one // (MPZ_THREE**s)
          t += 1 << max(0, wp - s * 2)
          return from_man_exp(t, -wp, prec, rnd)
      else:
          # Fast enough to sum directly?
          # Even better, we use the Euler product (idea stolen from pari)
          m = float(wp) / (s - 1) + 1
          if m < 30:
              needed_terms = int(2.0**m + 1)
              if needed_terms < int(wp / 2.54 + 5) / 10:
                  t = fone
                  for k in list_primes(needed_terms):
                      # print k, needed_terms
                      powprec = int(wp - s * math.log(k, 2))
                      if powprec < 2:
                          break
                      a = mpf_sub(
                          fone,
                          mpf_pow_int(from_int(k), -s, powprec),
                          wp,
                      )
                      t = mpf_mul(t, a, wp)
                  return mpf_div(fone, t, wp)
      # Use Borwein's algorithm
      n = int(wp / 2.54 + 5)
      d = borwein_coefficients(n)
      t = MPZ_ZERO
      s = MPZ(s)
      for k in xrange(n):
          t += (((-1) ** k * (d[k] - d[n])) << wp) // (k + 1) ** s
      t = (t << wp) // (-d[n])
      t = (t << wp) // ((1 << wp) - (1 << (wp + 1 - s)))
      if (s in zeta_int_cache and zeta_int_cache[s][0] < wp) or (
          s not in zeta_int_cache
      ):
          zeta_int_cache[s] = (wp, from_man_exp(t, -wp - wp))
      return from_man_exp(t, -wp - wp, prec, rnd)
  
imports: import math
  import sys
  from .backend import xrange
  from .backend import MPZ, MPZ_ZERO, MPZ_ONE, MPZ_THREE, gmpy
  from .libintmath import list_primes, ifac, ifac2, moebius
  from .libmpf import round_floor, round_ceiling, round_down, round_up, round_nearest, round_fast, lshift, sqrt_fixed, isqrt_fast, fzero, fone, fnone, fhalf, ftwo, finf, fninf, fnan, from_int, to_int, to_fixed, from_man_exp, from_rational, mpf_pos, mpf_neg, mpf_abs, mpf_add, mpf_sub, mpf_mul, mpf_mul_int, mpf_div, mpf_sqrt, mpf_pow_int, mpf_rdiv_int, mpf_perturb, mpf_le, mpf_lt, mpf_gt, mpf_shift, negative_rnd, reciprocal_rnd, bitcount, to_float, mpf_floor, mpf_sign, ComplexResult
  from .libelefun import constant_memo, def_mpf_constant, mpf_pi, pi_fixed, ln2_fixed, log_int_fixed, mpf_ln2, mpf_exp, mpf_log, mpf_pow, mpf_cosh, mpf_cos_sin, mpf_cosh_sinh, mpf_cos_sin_pi, mpf_cos_pi, mpf_sin_pi, ln_sqrt2pi_fixed, mpf_ln_sqrt2pi, sqrtpi_fixed, mpf_sqrtpi, cos_sin_fixed, exp_fixed
  from .libmpc import mpc_zero, mpc_one, mpc_half, mpc_two, mpc_abs, mpc_shift, mpc_pos, mpc_neg, mpc_add, mpc_sub, mpc_mul, mpc_div, mpc_add_mpf, mpc_mul_mpf, mpc_div_mpf, mpc_mpf_div, mpc_mul_int, mpc_pow_int, mpc_log, mpc_exp, mpc_pow, mpc_cos_pi, mpc_sin_pi, mpc_reciprocal, mpc_square, mpc_sub_mpf
label_desc: Use image node_id 19 for calling a global function with example usage: mpf_zeta_int(s, prec, rnd) and returns: from_man_exp, mpf_pos, mpf_div, mpf_perturb, mpf_neg, from_man_exp, mpf_div