code: def mpc_zetasum(s, a, n, derivatives, reflect, prec):
      """
      Fast version of mp._zetasum, assuming s = complex, a = integer.
      """
  
      wp = prec + 10
      derivatives = list(derivatives)
      have_derivatives = derivatives != [0]
      have_one_derivative = len(derivatives) == 1
  
      # parse s
      sre, sim = s
      critical_line = sre == fhalf
      sre = to_fixed(sre, wp)
      sim = to_fixed(sim, wp)
  
      if (
          a > 0
          and n > ZETASUM_SIEVE_CUTOFF
          and not have_derivatives
          and not reflect
          and (n < 4e7 or sys.maxsize > 2**32)
      ):
          re, im = zetasum_sieved(critical_line, sre, sim, a, n, wp)
          xs = [
              (
                  from_man_exp(re, -wp, prec, "n"),
                  from_man_exp(im, -wp, prec, "n"),
              )
          ]
          return xs, []
  
      maxd = max(derivatives)
      if not have_one_derivative:
          derivatives = range(maxd + 1)
  
      # x_d = 0, y_d = 0
      xre = [MPZ_ZERO for d in derivatives]
      xim = [MPZ_ZERO for d in derivatives]
      if reflect:
          yre = [MPZ_ZERO for d in derivatives]
          yim = [MPZ_ZERO for d in derivatives]
      else:
          yre = yim = []
  
      one = MPZ_ONE << wp
      one_2wp = MPZ_ONE << (2 * wp)
  
      ln2 = ln2_fixed(wp)
      pi2 = pi_fixed(wp - 1)
      wp2 = wp + wp
  
      for w in xrange(a, a + n + 1):
          log = log_int_fixed(w, wp, ln2)
          cos, sin = cos_sin_fixed((-sim * log) >> wp, wp, pi2)
          if critical_line:
              u = one_2wp // isqrt_fast(w << wp2)
          else:
              u = exp_fixed((-sre * log) >> wp, wp)
          xterm_re = (u * cos) >> wp
          xterm_im = (u * sin) >> wp
          if reflect:
              reciprocal = one_2wp // (u * w)
              yterm_re = (reciprocal * cos) >> wp
              yterm_im = (reciprocal * sin) >> wp
  
          if have_derivatives:
              if have_one_derivative:
                  log = pow_fixed(log, maxd, wp)
                  xre[0] += (xterm_re * log) >> wp
                  xim[0] += (xterm_im * log) >> wp
                  if reflect:
                      yre[0] += (yterm_re * log) >> wp
                      yim[0] += (yterm_im * log) >> wp
              else:
                  t = MPZ_ONE << wp
                  for d in derivatives:
                      xre[d] += (xterm_re * t) >> wp
                      xim[d] += (xterm_im * t) >> wp
                      if reflect:
                          yre[d] += (yterm_re * t) >> wp
                          yim[d] += (yterm_im * t) >> wp
                      t = (t * log) >> wp
          else:
              xre[0] += xterm_re
              xim[0] += xterm_im
              if reflect:
                  yre[0] += yterm_re
                  yim[0] += yterm_im
      if have_derivatives:
          if have_one_derivative:
              if maxd % 2:
                  xre[0] = -xre[0]
                  xim[0] = -xim[0]
                  if reflect:
                      yre[0] = -yre[0]
                      yim[0] = -yim[0]
          else:
              xre = [(-1) ** d * xre[d] for d in derivatives]
              xim = [(-1) ** d * xim[d] for d in derivatives]
              if reflect:
                  yre = [(-1) ** d * yre[d] for d in derivatives]
                  yim = [(-1) ** d * yim[d] for d in derivatives]
      xs = [
          (
              from_man_exp(xa, -wp, prec, "n"),
              from_man_exp(xb, -wp, prec, "n"),
          )
          for (xa, xb) in zip(xre, xim)
      ]
      ys = [
          (
              from_man_exp(ya, -wp, prec, "n"),
              from_man_exp(yb, -wp, prec, "n"),
          )
          for (ya, yb) in zip(yre, yim)
      ]
      return xs, ys
  
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 27 for calling a global function with example usage: mpc_zetasum(s, a, n, derivatives, reflect, prec) and returns: xs,  ys, xs,  list