code: def _load_run_test(result: TestResult, runtests: RunTests) -> None:
      # Load the test module and run the tests.
      test_name = result.test_name
      module_name = abs_module_name(test_name, runtests.test_dir)
      test_mod = importlib.import_module(module_name)
  
      if hasattr(test_mod, "test_main"):
          # https://github.com/python/cpython/issues/89392
          raise Exception(
              f"Module {test_name} defines test_main() which "
              f"is no longer supported by regrtest"
          )
  
      def test_func():
          return run_unittest(test_mod)
  
      try:
          regrtest_runner(result, test_func, runtests)
      finally:
          # First kill any dangling references to open files etc.
          # This can also issue some ResourceWarnings which would otherwise get
          # triggered during the following test run, and possibly produce
          # failures.
          support.gc_collect()
  
          remove_testfn(test_name, runtests.verbose)
  
      if gc.garbage:
          support.environment_altered = True
          print_warning(
              f"{test_name} created {len(gc.garbage)} "
              f"uncollectable object(s)"
          )
  
          # move the uncollectable objects somewhere,
          # so we don't see them again
          GC_GARBAGE.extend(gc.garbage)
          gc.garbage.clear()
  
      support.reap_children()
  
imports: import faulthandler
  import gc
  import importlib
  import io
  import sys
  import time
  import traceback
  import unittest
  from test import support
  from test.support import threading_helper
  from .filter import match_test
  from .result import State, TestResult, TestStats
  from .runtests import RunTests
  from .save_env import saved_test_environment
  from .setup import setup_tests
  from .testresult import get_test_runner
  from .utils import TestName, clear_caches, remove_testfn, abs_module_name, print_warning
label_desc: Use image node_id 5 for calling a global function with example usage: _load_run_test(result, runtests) and returns: run_unittest