code: def dmp_pow(f, n, u, K):
      """
      Raise ``f`` to the ``n``-th power in ``K[X]``.
  
      Examples
      ========
  
      >>> from sympy.polys import ring, ZZ
      >>> R, x,y = ring("x,y", ZZ)
  
      >>> R.dmp_pow(x*y + 1, 3)
      x**3*y**3 + 3*x**2*y**2 + 3*x*y + 1
  
      """
      if not u:
          return dup_pow(f, n, K)
  
      if not n:
          return dmp_one(u, K)
      if n < 0:
          raise ValueError(
              "Cannot raise polynomial to a negative power"
          )
      if n == 1 or dmp_zero_p(f, u) or dmp_one_p(f, u, K):
          return f
  
      g = dmp_one(u, K)
  
      while True:
          n, m = n // 2, n
  
          if m & 1:
              g = dmp_mul(g, f, u, K)
  
              if not n:
                  break
  
          f = dmp_sqr(f, u, K)
  
      return g
  
imports: from sympy.polys.densebasic import dup_slice, dup_LC, dmp_LC, dup_degree, dmp_degree, dup_strip, dmp_strip, dmp_zero_p, dmp_zero, dmp_one_p, dmp_one, dmp_ground, dmp_zeros
  from sympy.polys.polyerrors import ExactQuotientFailed, PolynomialDivisionFailed
label_desc: Use image node_id 36 for calling a global function with example usage: dmp_pow(f, n, u, K) and returns: g, dup_pow, dmp_one, f