code: def test_lower_primitive():
      input_mod = tvm.relay.parse(
          """
          #[version = "0.0.5"]
          def @main(%a: Tensor[(5, 7), float32]) -> Tensor[(5, 7), float32] {
            %0 = fn(%x : Tensor[(5, 7), float32], %y : Tensor[(5, 7), float32], Primitive=1) -> Tensor[(5, 7), float32] {
              add(%x, %y)
            };
            %0(%a, %a)
          }
          """,
          "from_string",
          None,
          None,
      )
  
      actual_mod = transform(input_mod)
  
      # Expected:
      #   def @main(%a: Tensor[(5, 7), float32]) -> Tensor[(5, 7), float32] {
      #     %0 = (%a, %a);
      #     call_lowered(@test_fused_add, %0, metadata={relay_attrs={Primitive=1},all_prim_fn_vars=[@test_fused_add]})
      #   }
      #   def @test_fused_add = <lowered PrimFunc>
  
      main = actual_mod["main"]
      call = main.body
      assert call.op.name == "call_lowered"
      assert len(call.args) == 2
      assert call.args[0].name_hint == "test_fused_add"
      assert len(call.args[1].fields) == 2
      assert call.args[1].fields[0].name_hint == "a"
      assert call.args[1].fields[1].name_hint == "a"
      assert call.attrs.metadata["relay_attrs"].Primitive == 1
      assert len(call.attrs.metadata["all_prim_fn_vars"]) == 1
      assert (
          call.attrs.metadata["all_prim_fn_vars"][0].name_hint
          == "test_fused_add"
      )
  
      test_fused_add = actual_mod["test_fused_add"]
      assert isinstance(test_fused_add, tvm.tir.PrimFunc)
  
file_path: tvm/tests/python/relay/backend/test_pass_lower_te.py
imports: import tvm
  import tvm.testing
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: test_lower_primitive() without return types