code: def test_module_list():
      """Checks the correct list of module names is generated"""
      input_x = tvm.relay.var(
          "x", tvm.relay.TensorType([1], dtype="float32")
      )
      expr = tvm.relay.add(
          input_x,
          tvm.relay.Constant(
              tvm.nd.array(np.array([1], dtype="float32"))
          ),
      )
      mod = tvm.relay.build(
          tvm.IRModule.from_expr(tvm.relay.Function([input_x], expr)),
          target="c",
          executor=tvm.relay.backend.Executor(
              "aot", {"interface-api": "packed"}
          ),
          mod_name="unusual_module_name_fred",
      )
      temp_dir = tvm.contrib.utils.TempDirectory()
      test_so_path = temp_dir / "test.so"
      mod.export_library(test_so_path, cc="gcc", options=["-std=c11"])
      loaded_mod = tvm.runtime.load_module(test_so_path)
      list_module_names = loaded_mod.get_function("list_module_names")
      names_expected = ["unusual_module_name_fred"]
      assert list(sorted(names_expected)) == list(
          sorted(list_module_names())
      )
  
file_path: tvm/tests/python/relay/aot/test_cpp_aot.py
imports: import re
  import textwrap
  import numpy
  import pytest
  import tvm
  from tvm import IRModule
  from tvm import relay
  from tvm.relay import backend, testing
  from tvm.testing.aot import generate_ref_data
label_desc: Use image node_id 4 for calling a global function with example usage: test_module_list() without return types