code: def build_msvcr_library(debug=False):
      if os.name != "nt":
          return False
  
      # If the version number is None, then we couldn't find the MSVC runtime at
      # all, because we are running on a Python distribution which is customed
      # compiled; trust that the compiler is the same as the one available to us
      # now, and that it is capable of linking with the correct runtime without
      # any extra options.
      msvcr_ver = msvc_runtime_major()
      if msvcr_ver is None:
          log.debug(
              "Skip building import library: "
              "Runtime is not compiled with MSVC"
          )
          return False
  
      # Skip using a custom library for versions < MSVC 8.0
      if msvcr_ver < 80:
          log.debug(
              "Skip building msvcr library:"
              " custom functionality not present"
          )
          return False
  
      msvcr_name = msvc_runtime_library()
      if debug:
          msvcr_name += "d"
  
      # Skip if custom library already exists
      out_name = "lib%s.a" % msvcr_name
      out_file = os.path.join(sys.prefix, "libs", out_name)
      if os.path.isfile(out_file):
          log.debug(
              'Skip building msvcr library: "%s" exists' % (out_file,)
          )
          return True
  
      # Find the msvcr dll
      msvcr_dll_name = msvcr_name + ".dll"
      dll_file = find_dll(msvcr_dll_name)
      if not dll_file:
          log.warn(
              'Cannot build msvcr library: "%s" not found'
              % msvcr_dll_name
          )
          return False
  
      def_name = "lib%s.def" % msvcr_name
      def_file = os.path.join(sys.prefix, "libs", def_name)
  
      log.info(
          'Building msvcr library: "%s" (from %s)'
          % (out_file, dll_file)
      )
  
      # Generate a symbol definition file from the msvcr dll
      generate_def(dll_file, def_file)
  
      # Create a custom mingw library for the given symbol definitions
      cmd = ["dlltool", "-d", def_file, "-l", out_file]
      retcode = subprocess.call(cmd)
  
      # Clean up symbol definitions
      os.remove(def_file)
  
      return not retcode
  
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 6 for calling a global function with example usage: build_msvcr_library(debug) and returns: unknown, False, False, False, True, False