code: def test_lower_extern():
      input_mod = tvm.relay.parse(
          """
          #[version = "0.0.5"]
          def @main(%a: Tensor[(5, 7), float32]) -> Tensor[(5, 7), float32] {
            @my_add(%a, %a)
          }
          def @my_add(%x : Tensor[(5, 7), float32], %y : Tensor[(5, 7), float32], Extern=1) -> Tensor[(5, 7), float32] {
            add(%x, %y)
          }
          """,
          "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(@my_add, %0, metadata={relay_attrs={Extern=1}}, all_prim_fn_vars=[]})
      #   }
      #   def @my_add(%x: Tensor[(5, 7), float32], %y: Tensor[(5, 7), float32], Extern=1) -> Tensor[(5, 7), float32] {
      #     add(%x, %y)
      #   }
  
      main = actual_mod["main"]
      call = main.body
      assert call.op.name == "call_lowered"
      assert len(call.args) == 2
      assert call.args[0].name_hint == "my_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"].Extern == 1
      assert len(call.attrs.metadata["all_prim_fn_vars"]) == 0
  
      test_add = actual_mod["my_add"]
      assert isinstance(test_add, tvm.relay.Function)
      assert test_add.attrs["Extern"] == 1
  
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 4 for calling a global function with example usage: test_lower_extern() without return types