code: def CCompiler_spawn(self, cmd, display=None, env=None):
      """
      Execute a command in a sub-process.
  
      Parameters
      ----------
      cmd : str
          The command to execute.
      display : str or sequence of str, optional
          The text to add to the log file kept by `numpy.distutils`.
          If not given, `display` is equal to `cmd`.
      env : a dictionary for environment variables, optional
  
      Returns
      -------
      None
  
      Raises
      ------
      DistutilsExecError
          If the command failed, i.e. the exit status was not 0.
  
      """
      env = env if env is not None else dict(os.environ)
      if display is None:
          display = cmd
          if is_sequence(display):
              display = " ".join(list(display))
      log.info(display)
      try:
          if self.verbose:
              subprocess.check_output(cmd, env=env)
          else:
              subprocess.check_output(
                  cmd, stderr=subprocess.STDOUT, env=env
              )
      except subprocess.CalledProcessError as exc:
          o = exc.output
          s = exc.returncode
      except OSError as e:
          # OSError doesn't have the same hooks for the exception
          # output, but exec_command() historically would use an
          # empty string for EnvironmentError (base class for
          # OSError)
          # o = b''
          # still that would make the end-user lost in translation!
          o = f"\n\n{e}\n\n\n"
          try:
              o = o.encode(sys.stdout.encoding)
          except AttributeError:
              o = o.encode("utf8")
          # status previously used by exec_command() for parent
          # of OSError
          s = 127
      else:
          # use a convenience return here so that any kind of
          # caught exception will execute the default code after the
          # try / except block, which handles various exceptions
          return None
  
      if is_sequence(cmd):
          cmd = " ".join(list(cmd))
  
      if self.verbose:
          forward_bytes_to_stdout(o)
  
      if re.search(b"Too many open files", o):
          msg = "\nTry rerunning setup command until build succeeds."
      else:
          msg = ""
      raise DistutilsExecError(
          'Command "%s" failed with exit status %d%s' % (cmd, s, msg)
      )
  
imports: import os
  import re
  import sys
  import platform
  import shlex
  import time
  import subprocess
  from copy import copy
  from pathlib import Path
  from distutils import ccompiler
  from distutils.ccompiler import compiler_class, gen_lib_options, get_default_compiler, new_compiler, CCompiler
  from distutils.errors import DistutilsExecError, DistutilsModuleError, DistutilsPlatformError, CompileError, UnknownFileError
  from distutils.sysconfig import customize_compiler
  from distutils.version import LooseVersion
  from numpy.distutils import log
  from numpy.distutils.exec_command import filepath_from_subprocess_output, forward_bytes_to_stdout
  from numpy.distutils.misc_util import cyg2win32, is_sequence, mingw32, get_num_build_jobs, _commandline_dep_string, sanitize_cxx_flags
  import threading
label_desc: Use image node_id 4 for calling a global function with example usage: CCompiler_spawn(cmd, display, env) and returns: None