code: def test_trace_can_change_traced_value_int():
      @tvm.register_func("tvm.tir.trace_change_int_first")
      def trace_buffer(x):
          return 13
  
      @tvm.register_func("tvm.tir.trace_change_int_second")
      def trace_buffer(x):
          return 14
  
      def check_assign(dtype):
          n = 4
          x = te.placeholder((n,), name="X", dtype=dtype)
          y = te.compute(
              x.shape,
              lambda i: tvm.tir.trace(
                  [x[i]], "tvm.tir.trace_change_int_first"
              ),
          )
          z = te.compute(
              x.shape,
              lambda i: tvm.tir.trace(
                  [y[i]], "tvm.tir.trace_change_int_second"
              ),
          )
          s = te.create_schedule(z.op)
          f = tvm.build(s, [x, y, z], "llvm")
  
          xnd = tvm.nd.array(np.ones((n,), dtype=x.dtype))
          ynd = tvm.nd.array(np.zeros((n,), dtype=y.dtype))
          znd = tvm.nd.array(np.zeros((n,), dtype=z.dtype))
          f(xnd, ynd, znd)
          check_array_first = np.array([13, 13, 13, 13])
          check_array_second = np.array([14, 14, 14, 14])
          assert np.array_equal(ynd.numpy(), check_array_first)
          assert np.array_equal(znd.numpy(), check_array_second)
  
      for t in ["int64", "int32"]:
          check_assign(t)
  
file_path: tvm/tests/python/runtime/test_runtime_trace.py
imports: import tvm
  from tvm import te
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: test_trace_can_change_traced_value_int() and returns: int, int