code: def chop_parts(value: TMP_RES, prec: int) -> TMP_RES:
      """
      Chop off tiny real or complex parts.
      """
      if value is S.ComplexInfinity:
          return value
      re, im, re_acc, im_acc = value
      # Method 1: chop based on absolute value
      if re and re not in _infs_nan and (fastlog(re) < -prec + 4):
          re, re_acc = None, None
      if im and im not in _infs_nan and (fastlog(im) < -prec + 4):
          im, im_acc = None, None
      # Method 2: chop if inaccurate and relatively small
      if re and im:
          delta = fastlog(re) - fastlog(im)
          if re_acc < 2 and (delta - re_acc <= -prec + 4):
              re, re_acc = None, None
          if im_acc < 2 and (delta - im_acc >= prec - 4):
              im, im_acc = None, None
      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 15 for calling a global function with example usage: chop_parts(value, prec) and returns: re,  im,  re_acc,  im_acc, value