code: def dmp_lift(f, u, K):
      """
      Convert algebraic coefficients to integers in ``K[X]``.
  
      Examples
      ========
  
      >>> from sympy.polys import ring, QQ
      >>> from sympy import I
  
      >>> K = QQ.algebraic_field(I)
      >>> R, x = ring("x", K)
  
      >>> f = x**2 + K([QQ(1), QQ(0)])*x + K([QQ(2), QQ(0)])
  
      >>> R.dmp_lift(f)
      x**8 + 2*x**6 + 9*x**4 - 8*x**2 + 16
  
      """
      if K.is_GaussianField:
          K1 = K.as_AlgebraicField()
          f = dmp_convert(f, u, K, K1)
          K = K1
  
      if not K.is_Algebraic:
          raise DomainError(
              "computation can be done only in an algebraic domain"
          )
  
      F, monoms, polys = dmp_to_dict(f, u), [], []
  
      for monom, coeff in F.items():
          if not coeff.is_ground:
              monoms.append(monom)
  
      perms = variations([-1, 1], len(monoms), repetition=True)
  
      for perm in perms:
          G = dict(F)
  
          for sign, monom in zip(perm, monoms):
              if sign == -1:
                  G[monom] = -G[monom]
  
          polys.append(dmp_from_dict(G, u, K))
  
      return dmp_convert(dmp_expand(polys, u, K), u, K, K.dom)
  
imports: from sympy.polys.densearith import dup_add_term, dmp_add_term, dup_lshift, dup_add, dmp_add, dup_sub, dmp_sub, dup_mul, dmp_mul, dup_sqr, dup_div, dup_rem, dmp_rem, dmp_expand, dup_mul_ground, dmp_mul_ground, dup_quo_ground, dmp_quo_ground, dup_exquo_ground, dmp_exquo_ground
  from sympy.polys.densebasic import dup_strip, dmp_strip, dup_convert, dmp_convert, dup_degree, dmp_degree, dmp_to_dict, dmp_from_dict, dup_LC, dmp_LC, dmp_ground_LC, dup_TC, dmp_TC, dmp_zero, dmp_ground, dmp_zero_p, dup_to_raw_dict, dup_from_raw_dict, dmp_zeros
  from sympy.polys.polyerrors import MultivariatePolynomialError, DomainError
  from sympy.utilities import variations
  from math import ceil, log
label_desc: Use image node_id 39 for calling a global function with example usage: dmp_lift(f, u, K) and returns: dmp_convert