class_docstr: Concrete class that implements an interface to Microsoft Visual C++,
  as defined by the CCompiler abstract class.
class_docstr_tok: ["Concrete","class","that","implements","an","interface","to","Microsoft","Visual","C++",",","as","defined","by","the","CCompiler","abstract","class","."]
code: def initialize(self, plat_name=None):
      # multi-init means we would need to check platform same each time...
      assert not self.initialized, "don't init multiple times"
      if plat_name is None:
          plat_name = get_platform()
      # sanity check for platforms to prevent obscure errors later.
      if plat_name not in PLAT_TO_VCVARS:
          raise DistutilsPlatformError(
              "--plat-name must be one of {}".format(
                  tuple(PLAT_TO_VCVARS)
              )
          )
  
      # Get the vcvarsall.bat spec for the requested platform.
      plat_spec = PLAT_TO_VCVARS[plat_name]
  
      vc_env = _get_vc_env(plat_spec)
      if not vc_env:
          raise DistutilsPlatformError(
              "Unable to find a compatible "
              "Visual Studio installation."
          )
  
      self._paths = vc_env.get("path", "")
      paths = self._paths.split(os.pathsep)
      self.cc = _find_exe("cl.exe", paths)
      self.linker = _find_exe("link.exe", paths)
      self.lib = _find_exe("lib.exe", paths)
      self.rc = _find_exe("rc.exe", paths)  # resource compiler
      self.mc = _find_exe("mc.exe", paths)  # message compiler
      self.mt = _find_exe("mt.exe", paths)  # message compiler
  
      for dir in vc_env.get("include", "").split(os.pathsep):
          if dir:
              self.add_include_dir(dir.rstrip(os.sep))
  
      for dir in vc_env.get("lib", "").split(os.pathsep):
          if dir:
              self.add_library_dir(dir.rstrip(os.sep))
  
      self.preprocess_options = None
      # bpo-38597: Always compile with dynamic linking
      # Future releases of Python 3.x will include all past
      # versions of vcruntime*.dll for compatibility.
      self.compile_options = [
          "/nologo",
          "/Ox",
          "/W3",
          "/GL",
          "/DNDEBUG",
          "/MD",
      ]
  
      self.compile_options_debug = [
          "/nologo",
          "/Od",
          "/MDd",
          "/Zi",
          "/W3",
          "/D_DEBUG",
      ]
  
      ldflags = ["/nologo", "/INCREMENTAL:NO", "/LTCG"]
  
      ldflags_debug = [
          "/nologo",
          "/INCREMENTAL:NO",
          "/LTCG",
          "/DEBUG:FULL",
      ]
  
      self.ldflags_exe = [*ldflags, "/MANIFEST:EMBED,ID=1"]
      self.ldflags_exe_debug = [*ldflags_debug, "/MANIFEST:EMBED,ID=1"]
      self.ldflags_shared = [
          *ldflags,
          "/DLL",
          "/MANIFEST:EMBED,ID=2",
          "/MANIFESTUAC:NO",
      ]
      self.ldflags_shared_debug = [
          *ldflags_debug,
          "/DLL",
          "/MANIFEST:EMBED,ID=2",
          "/MANIFESTUAC:NO",
      ]
      self.ldflags_static = [*ldflags]
      self.ldflags_static_debug = [*ldflags_debug]
  
      self._ldflags = {
          (CCompiler.EXECUTABLE, None): self.ldflags_exe,
          (CCompiler.EXECUTABLE, False): self.ldflags_exe,
          (CCompiler.EXECUTABLE, True): self.ldflags_exe_debug,
          (CCompiler.SHARED_OBJECT, None): self.ldflags_shared,
          (CCompiler.SHARED_OBJECT, False): self.ldflags_shared,
          (CCompiler.SHARED_OBJECT, True): self.ldflags_shared_debug,
          (CCompiler.SHARED_LIBRARY, None): self.ldflags_static,
          (CCompiler.SHARED_LIBRARY, False): self.ldflags_static,
          (CCompiler.SHARED_LIBRARY, True): self.ldflags_static_debug,
      }
  
      self.initialized = True
  
imports: import os
  import subprocess
  import winreg
  from distutils.errors import DistutilsExecError, DistutilsPlatformError, CompileError, LibError, LinkError
  from distutils.ccompiler import CCompiler, gen_lib_options
  from distutils import log
  from distutils.util import get_platform
  from itertools import count
label_desc: Use image node_id 2 for calling the MSVCCompiler obj's underlying member method code with example usage: obj.initialize(plat_name) without return types