code: def evalf_add(v: "Add", prec: int, options: OPT_DICT) -> TMP_RES:
      res = pure_complex(v)
      if res:
          h, c = res
          re, _, re_acc, _ = evalf(h, prec, options)
          im, _, im_acc, _ = evalf(c, prec, options)
          return re, im, re_acc, im_acc
  
      oldmaxprec = options.get("maxprec", DEFAULT_MAXPREC)
  
      i = 0
      target_prec = prec
      while 1:
          options["maxprec"] = min(oldmaxprec, 2 * prec)
  
          terms = [evalf(arg, prec + 10, options) for arg in v.args]
          n = terms.count(S.ComplexInfinity)
          if n >= 2:
              return fnan, None, prec, None
          re, re_acc = add_terms(
              [a[0::2] for a in terms if isinstance(a, tuple) and a[0]],
              prec,
              target_prec,
          )
          im, im_acc = add_terms(
              [a[1::2] for a in terms if isinstance(a, tuple) and a[1]],
              prec,
              target_prec,
          )
          if n == 1:
              if re in (finf, fninf, fnan) or im in (finf, fninf, fnan):
                  return fnan, None, prec, None
              return S.ComplexInfinity
          acc = complex_accuracy((re, im, re_acc, im_acc))
          if acc >= target_prec:
              if options.get("verbose"):
                  print(
                      "ADD: wanted",
                      target_prec,
                      "accurate bits, got",
                      re_acc,
                      im_acc,
                  )
              break
          else:
              if (prec - target_prec) > options["maxprec"]:
                  break
  
              prec = prec + max(10 + 2**i, target_prec - acc)
              i += 1
              if options.get("verbose"):
                  print("ADD: restarting with prec", prec)
  
      options["maxprec"] = oldmaxprec
      if iszero(re, scaled=True):
          re = scaled_zero(re)
      if iszero(im, scaled=True):
          im = scaled_zero(im)
      return re, im, re_acc, im_acc
  
imports: from __future__ import annotations
  from typing import Tuple, Optional, Union, Callable, List, Dict, Type, TYPE_CHECKING, Any, overload
  import math
  import mpmath.libmp
  from mpmath import make_mpc, make_mpf, mp, mpc, mpf, nsum, quadts, quadosc, workprec
  from mpmath import inf
  from mpmath.libmp import from_int, from_man_exp, from_rational, fhalf, fnan, finf, fninf, fnone, fone, fzero, mpf_abs, mpf_add, mpf_atan, mpf_atan2, mpf_cmp, mpf_cos, mpf_e, mpf_exp, mpf_log, mpf_lt, mpf_mul, mpf_neg, mpf_pi, mpf_pow, mpf_pow_int, mpf_shift, mpf_sin, mpf_sqrt, normalize, round_nearest, to_int, to_str
  from mpmath.libmp import bitcount
  from mpmath.libmp.backend import MPZ
  from mpmath.libmp.libmpc import _infs_nan
  from mpmath.libmp.libmpf import dps_to_prec, prec_to_dps
  from .sympify import sympify
  from .singleton import S
  from sympy.external.gmpy import SYMPY_INTS
  from sympy.utilities.iterables import is_sequence
  from sympy.utilities.lambdify import lambdify
  from sympy.utilities.misc import as_int
label_desc: Use image node_id 24 for calling a global function with example usage: evalf_add(v, prec, options) and returns: re,  im,  re_acc,  im_acc, re,  im,  re_acc,  im_acc, fnan,  None,  prec,  None, S, fnan,  None,  prec,  None