code: def test_multivariate():
      v = [te.var("v%d" % i) for i in range(4)]
      b = te.var("b")
      m = tvm.arith.detect_linear_equation(
          v[0] * (b + 4) + v[0] + v[1] * 8, v
      )
  
      tvm.testing.assert_prim_expr_equal(m[0], b + 5)
  
      assert m[1].value == 8
  
      m = tvm.arith.detect_linear_equation(
          v[0] * (b + 4) + v[0] + v[1] * 8 * v[2], v
      )
      assert len(m) == 0
  
      m = tvm.arith.detect_linear_equation(
          v[0] * (b + 4) + v[0] + v[1] * 8 * v[1] + v[3], v
      )
      assert len(m) == 0
  
      m = tvm.arith.detect_linear_equation(
          ((v[0] * b + v[1]) * 8 + v[2] + 1) * 2, v
      )
      assert m[1].value == 16
      assert m[2].value == 2
      assert m[len(m) - 1].value == 2
  
      m = tvm.arith.detect_linear_equation((v[0] - v[1]), [v[2]])
      assert m[0].value == 0
  
      tvm.testing.assert_prim_expr_equal(m[1], v[0] - v[1])
  
      m = tvm.arith.detect_linear_equation((v[0] - v[1]), [])
      assert len(m) == 1
      tvm.testing.assert_prim_expr_equal(m[0], v[0] - v[1])
  
imports: import tvm
  import tvm.testing
  from tvm import te
label_desc: Use image node_id 2 for calling a global function with example usage: test_multivariate() without return types