code: def test_type_var():
      # type var in 0.6
      nodes = [
          {"type_key": ""},
          {
              "type_key": "relay.TypeVar",
              "attrs": {"kind": "0", "span": "0", "var": "2"},
          },
          {
              "type_key": "Variable",
              "attrs": {"dtype": "int32", "name": "in0"},
          },
      ]
      data = {
          "root": 1,
          "nodes": nodes,
          "attrs": {"tvm_version": "0.6.0"},
          "b64ndarrays": [],
      }
      tvar = tvm.ir.load_json(json.dumps(data))
      assert isinstance(tvar, tvm.ir.TypeVar)
      assert tvar.name_hint == "in0"
      nodes[1]["type_key"] = "relay.GlobalTypeVar"
      tvar = tvm.ir.load_json(json.dumps(data))
      assert isinstance(tvar, tvm.ir.GlobalTypeVar)
      assert tvar.name_hint == "in0"
  
file_path: tvm/tests/python/relay/test_json_compact.py
imports: import tvm
  from tvm import relay
  from tvm import te
  import json
label_desc: Use image node_id 1 for calling a global function with example usage: test_type_var() without return types