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_cmd = "%s %s" % (lib2def.DEFAULT_NM, lib_file)
      nm_output = lib2def.getnm(nm_cmd)
      dlist, flist = lib2def.parse_nm(nm_output)
      lib2def.output_def(
          dlist, flist, lib2def.DEF_HEADER, open(def_file, "w")
      )
  
      dll_name = find_python_dll()
      args = (dll_name, def_file, out_file)
      cmd = 'dlltool --dllname "%s" --def "%s" --output-lib "%s"' % args
      status = os.system(cmd)
      # for now, fail silently
      if status:
          log.warn(
              "Failed to build import library for gcc. Linking will fail."
          )
      return
  
imports: from __future__ import division, absolute_import, print_function
  import os
  import sys
  import subprocess
  import re
  import numpy.distutils.ccompiler
  import distutils.cygwinccompiler
  from distutils.version import StrictVersion
  from numpy.distutils.ccompiler import gen_preprocess_options, gen_lib_options
  from distutils.unixccompiler import UnixCCompiler
  from distutils.msvccompiler import get_build_version
  from distutils.errors import DistutilsExecError, CompileError, 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