code: def test_heugcd_multivariate_integers():
      R, x, y = ring("x,y", ZZ)
  
      f, g = 2 * x**2 + 4 * x + 2, x + 1
      assert heugcd(f, g) == (x + 1, 2 * x + 2, 1)
  
      f, g = x + 1, 2 * x**2 + 4 * x + 2
      assert heugcd(f, g) == (x + 1, 1, 2 * x + 2)
  
      R, x, y, z, u = ring("x,y,z,u", ZZ)
  
      f, g = u**2 + 2 * u + 1, 2 * u + 2
      assert heugcd(f, g) == (u + 1, u + 1, 2)
  
      f, g = (
          z**2 * u**2 + 2 * z**2 * u + z**2 + z * u + z,
          u**2 + 2 * u + 1,
      )
      h, cff, cfg = u + 1, z**2 * u + z**2 + z, u + 1
  
      assert heugcd(f, g) == (h, cff, cfg)
      assert heugcd(g, f) == (h, cfg, cff)
  
      R, x, y, z = ring("x,y,z", ZZ)
  
      f, g, h = R.fateman_poly_F_1()
      H, cff, cfg = heugcd(f, g)
  
      assert H == h and H * cff == f and H * cfg == g
  
      R, x, y, z, u, v = ring("x,y,z,u,v", ZZ)
  
      f, g, h = R.fateman_poly_F_1()
      H, cff, cfg = heugcd(f, g)
  
      assert H == h and H * cff == f and H * cfg == g
  
      R, x, y, z, u, v, a, b = ring("x,y,z,u,v,a,b", ZZ)
  
      f, g, h = R.fateman_poly_F_1()
      H, cff, cfg = heugcd(f, g)
  
      assert H == h and H * cff == f and H * cfg == g
  
      R, x, y, z, u, v, a, b, c, d = ring("x,y,z,u,v,a,b,c,d", ZZ)
  
      f, g, h = R.fateman_poly_F_1()
      H, cff, cfg = heugcd(f, g)
  
      assert H == h and H * cff == f and H * cfg == g
  
      R, x, y, z = ring("x,y,z", ZZ)
  
      f, g, h = R.fateman_poly_F_2()
      H, cff, cfg = heugcd(f, g)
  
      assert H == h and H * cff == f and H * cfg == g
  
      f, g, h = R.fateman_poly_F_3()
      H, cff, cfg = heugcd(f, g)
  
      assert H == h and H * cff == f and H * cfg == g
  
      R, x, y, z, t = ring("x,y,z,t", ZZ)
  
      f, g, h = R.fateman_poly_F_3()
      H, cff, cfg = heugcd(f, g)
  
      assert H == h and H * cff == f and H * cfg == g
  
imports: from sympy.polys.rings import ring
  from sympy.polys.domains import ZZ
  from sympy.polys.heuristicgcd import heugcd
label_desc: Use image node_id 2 for calling a global function with example usage: test_heugcd_multivariate_integers() without return types