code: def test_op_temp_attr():
      """Tests reset_attr functionality."""
  
      def add1(x):
          return x + 1
  
      def add2(x):
          return x + 2
  
      # Set original attr value is add1.
      tvm.ir.register_op_attr("sqrt", "ftest", add1)
  
      with TempOpAttr("sqrt", "ftest", add2):
          # Check that the attr value is updated to add2.
          assert relay.op.get("sqrt").get_attr("ftest")(1) == 3
  
      # Check that the attr value is recovered to add1.
      assert relay.op.get("sqrt").get_attr("ftest")(1) == 2
  
file_path: tvm/tests/python/relay/test_ir_op.py
imports: import tvm
  from tvm import relay
  from tvm.relay.testing.temp_op_attr import TempOpAttr
  from tvm.relay.op import op
label_desc: Use image node_id 3 for calling a global function with example usage: test_op_temp_attr() and returns: unknown, unknown