code: def mpc_atan(z, prec, rnd=round_fast):
      a, b = z
      # atan(z) = (I/2)*(log(1-I*z) - log(1+I*z))
      # x = 1-I*z = 1 + b - I*a
      # y = 1+I*z = 1 - b + I*a
      wp = prec + 15
      x = mpf_add(fone, b, wp), mpf_neg(a)
      y = mpf_sub(fone, b, wp), a
      l1 = mpc_log(x, wp)
      l2 = mpc_log(y, wp)
      a, b = mpc_sub(l1, l2, prec, rnd)
      # (I/2) * (a+b*I) = (-b/2 + a/2*I)
      v = mpf_neg(mpf_shift(b, -1)), mpf_shift(a, -1)
      # Subtraction at infinity gives correct real part but
      # wrong imaginary part (should be zero)
      if v[1] == fnan and mpc_is_inf(z):
          v = (v[0], fzero)
      return v
  
imports: import sys
  from .backend import MPZ, MPZ_ZERO, MPZ_ONE, MPZ_TWO, BACKEND
  from .libmpf import round_floor, round_ceiling, round_down, round_up, round_nearest, round_fast, bitcount, bctable, normalize, normalize1, reciprocal_rnd, rshift, lshift, giant_steps, negative_rnd, to_str, to_fixed, from_man_exp, from_float, to_float, from_int, to_int, fzero, fone, ftwo, fhalf, finf, fninf, fnan, fnone, mpf_abs, mpf_pos, mpf_neg, mpf_add, mpf_sub, mpf_mul, mpf_div, mpf_mul_int, mpf_shift, mpf_sqrt, mpf_hypot, mpf_rdiv_int, mpf_floor, mpf_ceil, mpf_nint, mpf_frac, mpf_sign, mpf_hash, ComplexResult
  from .libelefun import mpf_pi, mpf_exp, mpf_log, mpf_cos_sin, mpf_cosh_sinh, mpf_tan, mpf_pow_int, mpf_log_hypot, mpf_cos_sin_pi, mpf_phi, mpf_cos, mpf_sin, mpf_cos_pi, mpf_sin_pi, mpf_atan, mpf_atan2, mpf_cosh, mpf_sinh, mpf_tanh, mpf_asin, mpf_acos, mpf_acosh, mpf_nthroot, mpf_fibonacci
label_desc: Use image node_id 50 for calling a global function with example usage: mpc_atan(z, prec, rnd) and returns: v