code: def build_module_distutils(
      source_files, config_code, module_name, **kw
  ):
      """
      Build a module via distutils and import it.
  
      """
      d = get_module_dir()
  
      # Copy files
      dst_sources = []
      for fn in source_files:
          if not os.path.isfile(fn):
              raise RuntimeError("%s is not a file" % fn)
          dst = os.path.join(d, os.path.basename(fn))
          shutil.copyfile(fn, dst)
          dst_sources.append(dst)
  
      # Build script
      config_code = textwrap.dedent(config_code).replace("\n", "\n    ")
  
      code = rf"""
  import os
  import sys
  sys.path = {repr(sys.path)}
  
  def configuration(parent_name='',top_path=None):
      from numpy.distutils.misc_util import Configuration
      config = Configuration('', parent_name, top_path)
      {config_code}
      return config
  
  if __name__ == "__main__":
      from numpy.distutils.core import setup
      setup(configuration=configuration)
      """
      script = os.path.join(d, get_temp_module_name() + ".py")
      dst_sources.append(script)
      with open(script, "wb") as f:
          f.write(code.encode("latin1"))
  
      # Build
      cwd = os.getcwd()
      try:
          os.chdir(d)
          cmd = [sys.executable, script, "build_ext", "-i"]
          p = subprocess.Popen(
              cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
          )
          out, err = p.communicate()
          if p.returncode != 0:
              raise RuntimeError(
                  "Running distutils build failed: %s\n%s"
                  % (cmd[4:], asstr(out))
              )
      finally:
          os.chdir(cwd)
  
          # Partial cleanup
          for fn in dst_sources:
              os.unlink(fn)
  
      # Import
      __import__(module_name)
      return sys.modules[module_name]
  
imports: import glob
  import os
  import sys
  import subprocess
  import tempfile
  import shutil
  import atexit
  import textwrap
  import re
  import pytest
  import contextlib
  import numpy
  from pathlib import Path
  from numpy._utils import asunicode
  from numpy.testing import temppath, IS_WASM
  from importlib import import_module
label_desc: Use image node_id 11 for calling a global function with example usage: build_module_distutils(source_files, config_code, module_name) and returns: sys