code: def mpc_sqrt(z, prec, rnd=round_fast):
      """Complex square root (principal branch).
  
      We have sqrt(a+bi) = sqrt((r+a)/2) + b/sqrt(2*(r+a))*i where
      r = abs(a+bi), when a+bi is not a negative real number."""
      a, b = z
      if b == fzero:
          if a == fzero:
              return (a, b)
          # When a+bi is a negative real number, we get a real sqrt times i
          if a[0]:
              im = mpf_sqrt(mpf_neg(a), prec, rnd)
              return (fzero, im)
          else:
              re = mpf_sqrt(a, prec, rnd)
              return (re, fzero)
      wp = prec + 20
      if not a[0]:  # case a positive
          t = mpf_add(mpc_abs((a, b), wp), a, wp)  # t = abs(a+bi) + a
          u = mpf_shift(t, -1)  # u = t/2
          re = mpf_sqrt(u, prec, rnd)  # re = sqrt(u)
          v = mpf_shift(t, 1)  # v = 2*t
          w = mpf_sqrt(v, wp)  # w = sqrt(v)
          im = mpf_div(b, w, prec, rnd)  # im = b / w
      else:  # case a negative
          t = mpf_sub(mpc_abs((a, b), wp), a, wp)  # t = abs(a+bi) - a
          u = mpf_shift(t, -1)  # u = t/2
          im = mpf_sqrt(u, prec, rnd)  # im = sqrt(u)
          v = mpf_shift(t, 1)  # v = 2*t
          w = mpf_sqrt(v, wp)  # w = sqrt(v)
          re = mpf_div(b, w, prec, rnd)  # re = b/w
          if b[0]:
              re = mpf_neg(re)
              im = mpf_neg(im)
      return re, im
  
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 34 for calling a global function with example usage: mpc_sqrt(z, prec, rnd) and returns: re,  im, a,  b, fzero,  im, re,  fzero