code: def dup_gff_list(f, K):
      """
      Compute greatest factorial factorization of ``f`` in ``K[x]``.
  
      Examples
      ========
  
      >>> from sympy.polys import ring, ZZ
      >>> R, x = ring("x", ZZ)
  
      >>> R.dup_gff_list(x**5 + 2*x**4 - x**3 - 2*x**2)
      [(x, 1), (x + 2, 4)]
  
      """
      if not f:
          raise ValueError(
              "greatest factorial factorization doesn't exist for a zero polynomial"
          )
  
      f = dup_monic(f, K)
  
      if not dup_degree(f):
          return []
      else:
          g = dup_gcd(f, dup_shift(f, K.one, K), K)
          H = dup_gff_list(g, K)
  
          for i, (h, k) in enumerate(H):
              g = dup_mul(g, dup_shift(h, -K(k), K), K)
              H[i] = (h, k + 1)
  
          f = dup_quo(f, g, K)
  
          if not dup_degree(f):
              return H
          else:
              return [(f, 1)] + H
  
imports: from sympy.polys.densearith import dup_neg, dmp_neg, dup_sub, dmp_sub, dup_mul, dup_quo, dmp_quo, dup_mul_ground, dmp_mul_ground
  from sympy.polys.densebasic import dup_strip, dup_LC, dmp_ground_LC, dmp_zero_p, dmp_ground, dup_degree, dmp_degree, dmp_raise, dmp_inject, dup_convert
  from sympy.polys.densetools import dup_diff, dmp_diff, dmp_diff_in, dup_shift, dmp_compose, dup_monic, dmp_ground_monic, dup_primitive, dmp_ground_primitive
  from sympy.polys.euclidtools import dup_inner_gcd, dmp_inner_gcd, dup_gcd, dmp_gcd, dmp_resultant
  from sympy.polys.galoistools import gf_sqf_list, gf_sqf_part
  from sympy.polys.polyerrors import MultivariatePolynomialError, DomainError
label_desc: Use image node_id 16 for calling a global function with example usage: dup_gff_list(f, K) and returns: list, H, unknown