code: def dup_sub_term(f, c, i, K):
      """
      Subtract ``c*x**i`` from ``f`` in ``K[x]``.
  
      Examples
      ========
  
      >>> from sympy.polys import ring, ZZ
      >>> R, x = ring("x", ZZ)
  
      >>> R.dup_sub_term(2*x**4 + x**2 - 1, ZZ(2), 4)
      x**2 - 1
  
      """
      if not c:
          return f
  
      n = len(f)
      m = n - i - 1
  
      if i == n - 1:
          return dup_strip([f[0] - c] + f[1:])
      else:
          if i >= n:
              return [-c] + [K.zero] * (i - n) + f
          else:
              return f[:m] + [f[m] - c] + f[m + 1 :]
  
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 3 for calling a global function with example usage: dup_sub_term(f, c, i, K) and returns: f, dup_strip, unknown, unknown