code: def _build_import_library_x86():
      """Build the import libraries for Mingw32-gcc on Windows"""
      out_exists, out_file = _check_for_import_lib()
      if out_exists:
          log.debug(
              'Skip building import library: "%s" exists', out_file
          )
          return
  
      lib_name = "python%d%d.lib" % tuple(sys.version_info[:2])
      lib_file = os.path.join(sys.prefix, "libs", lib_name)
      if not os.path.isfile(lib_file):
          # didn't find library file in virtualenv, try base distribution, too,
          # and use that instead if found there. for Python 2.7 venvs, the base
          # directory is in attribute real_prefix instead of base_prefix.
          if hasattr(sys, "base_prefix"):
              base_lib = os.path.join(sys.base_prefix, "libs", lib_name)
          elif hasattr(sys, "real_prefix"):
              base_lib = os.path.join(sys.real_prefix, "libs", lib_name)
          else:
              base_lib = ""  # os.path.isfile('') == False
  
          if os.path.isfile(base_lib):
              lib_file = base_lib
          else:
              log.warn(
                  'Cannot build import library: "%s" not found',
                  lib_file,
              )
              return
      log.info('Building import library (ARCH=x86): "%s"', out_file)
  
      from numpy.distutils import lib2def
  
      def_name = "python%d%d.def" % tuple(sys.version_info[:2])
      def_file = os.path.join(sys.prefix, "libs", def_name)
      nm_output = lib2def.getnm(
          lib2def.DEFAULT_NM + [lib_file], shell=False
      )
      dlist, flist = lib2def.parse_nm(nm_output)
      with open(def_file, "w") as fid:
          lib2def.output_def(dlist, flist, lib2def.DEF_HEADER, fid)
  
      dll_name = find_python_dll()
  
      cmd = [
          "dlltool",
          "--dllname",
          dll_name,
          "--def",
          def_file,
          "--output-lib",
          out_file,
      ]
      status = subprocess.check_output(cmd)
      if status:
          log.warn(
              "Failed to build import library for gcc. Linking will fail."
          )
      return
  
imports: import os
  import sys
  import subprocess
  import re
  import textwrap
  import numpy.distutils.ccompiler
  from numpy.distutils import log
  import distutils.cygwinccompiler
  from distutils.unixccompiler import UnixCCompiler
  from distutils.msvccompiler import get_build_version
  from distutils.errors import UnknownFileError
  from numpy.distutils.misc_util import msvc_runtime_library, msvc_runtime_version, msvc_runtime_major, get_build_architecture
label_desc: Use image node_id 10 for calling a global function with example usage: _build_import_library_x86() without return types