code: def _dmp_inner_gcd(f, g, u, K):
      """Helper function for `dmp_inner_gcd()`."""
      if not K.is_Exact:
          try:
              exact = K.get_exact()
          except DomainError:
              return dmp_one(u, K), f, g
  
          f = dmp_convert(f, u, K, exact)
          g = dmp_convert(g, u, K, exact)
  
          h, cff, cfg = _dmp_inner_gcd(f, g, u, exact)
  
          h = dmp_convert(h, u, exact, K)
          cff = dmp_convert(cff, u, exact, K)
          cfg = dmp_convert(cfg, u, exact, K)
  
          return h, cff, cfg
      elif K.is_Field:
          if K.is_QQ and query("USE_HEU_GCD"):
              try:
                  return dmp_qq_heu_gcd(f, g, u, K)
              except HeuristicGCDFailed:
                  pass
  
          return dmp_ff_prs_gcd(f, g, u, K)
      else:
          if K.is_ZZ and query("USE_HEU_GCD"):
              try:
                  return dmp_zz_heu_gcd(f, g, u, K)
              except HeuristicGCDFailed:
                  pass
  
          return dmp_rr_prs_gcd(f, g, u, K)
  
imports: from sympy.polys.densearith import dup_sub_mul, dup_neg, dmp_neg, dmp_add, dmp_sub, dup_mul, dmp_mul, dmp_pow, dup_div, dmp_div, dup_rem, dup_quo, dmp_quo, dup_prem, dmp_prem, dup_mul_ground, dmp_mul_ground, dmp_mul_term, dup_quo_ground, dmp_quo_ground, dup_max_norm, dmp_max_norm
  from sympy.polys.densebasic import dup_strip, dmp_raise, dmp_zero, dmp_one, dmp_ground, dmp_one_p, dmp_zero_p, dmp_zeros, dup_degree, dmp_degree, dmp_degree_in, dup_LC, dmp_LC, dmp_ground_LC, dmp_multi_deflate, dmp_inflate, dup_convert, dmp_convert, dmp_apply_pairs
  from sympy.polys.densetools import dup_clear_denoms, dmp_clear_denoms, dup_diff, dmp_diff, dup_eval, dmp_eval, dmp_eval_in, dup_trunc, dmp_ground_trunc, dup_monic, dmp_ground_monic, dup_primitive, dmp_ground_primitive, dup_extract, dmp_ground_extract
  from sympy.polys.galoistools import gf_int, gf_crt
  from sympy.polys.polyconfig import query
  from sympy.polys.polyerrors import MultivariatePolynomialError, HeuristicGCDFailed, HomomorphismFailed, NotInvertible, DomainError
label_desc: Use image node_id 41 for calling a global function with example usage: _dmp_inner_gcd(f, g, u, K) and returns: h,  cff,  cfg, dmp_ff_prs_gcd, dmp_rr_prs_gcd, dmp_one,  f,  g, dmp_qq_heu_gcd, dmp_zz_heu_gcd