class_docstr: Concrete class that implements an interface to Microsoft Visual C++,
  as defined by the CCompiler abstract class.
code: def initialize(self, plat_name=None):  # noqa: C901
      # multi-init means we would need to check platform same each time...
      assert not self.initialized, "don't init multiple times"
      if self.__version < 8.0:
          raise DistutilsPlatformError(
              "VC %0.1f is not supported by this module"
              % self.__version
          )
      if plat_name is None:
          plat_name = get_platform()
      # sanity check for platforms to prevent obscure errors later.
      ok_plats = "win32", "win-amd64"
      if plat_name not in ok_plats:
          raise DistutilsPlatformError(
              "--plat-name must be one of {}".format(ok_plats)
          )
  
      if (
          "DISTUTILS_USE_SDK" in os.environ
          and "MSSdk" in os.environ
          and self.find_exe("cl.exe")
      ):
          # Assume that the SDK set up everything alright; don't try to be
          # smarter
          self.cc = "cl.exe"
          self.linker = "link.exe"
          self.lib = "lib.exe"
          self.rc = "rc.exe"
          self.mc = "mc.exe"
      else:
          # On x86, 'vcvars32.bat amd64' creates an env that doesn't work;
          # to cross compile, you use 'x86_amd64'.
          # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross
          # compile use 'x86' (ie, it runs the x86 compiler directly)
          if plat_name in (get_platform(), "win32"):
              # native build or cross-compile to win32
              plat_spec = PLAT_TO_VCVARS[plat_name]
          else:
              # cross compile from win32 -> some 64bit
              plat_spec = (
                  PLAT_TO_VCVARS[get_platform()]
                  + "_"
                  + PLAT_TO_VCVARS[plat_name]
              )
  
          vc_env = query_vcvarsall(VERSION, plat_spec)
  
          self.__paths = vc_env["path"].split(os.pathsep)
          os.environ["lib"] = vc_env["lib"]
          os.environ["include"] = vc_env["include"]
  
          if len(self.__paths) == 0:
              raise DistutilsPlatformError(
                  "Python was built with %s, "
                  "and extensions need to be built with the same "
                  "version of the compiler, but it isn't installed."
                  % self.__product
              )
  
          self.cc = self.find_exe("cl.exe")
          self.linker = self.find_exe("link.exe")
          self.lib = self.find_exe("lib.exe")
          self.rc = self.find_exe("rc.exe")  # resource compiler
          self.mc = self.find_exe("mc.exe")  # message compiler
          # self.set_path_env_var('lib')
          # self.set_path_env_var('include')
  
      # extend the MSVC path with the current path
      try:
          for p in os.environ["path"].split(";"):
              self.__paths.append(p)
      except KeyError:
          pass
      self.__paths = normalize_and_reduce_paths(self.__paths)
      os.environ["path"] = ";".join(self.__paths)
  
      self.preprocess_options = None
      if self.__arch == "x86":
          self.compile_options = [
              "/nologo",
              "/O2",
              "/MD",
              "/W3",
              "/DNDEBUG",
          ]
          self.compile_options_debug = [
              "/nologo",
              "/Od",
              "/MDd",
              "/W3",
              "/Z7",
              "/D_DEBUG",
          ]
      else:
          # Win64
          self.compile_options = [
              "/nologo",
              "/O2",
              "/MD",
              "/W3",
              "/GS-",
              "/DNDEBUG",
          ]
          self.compile_options_debug = [
              "/nologo",
              "/Od",
              "/MDd",
              "/W3",
              "/GS-",
              "/Z7",
              "/D_DEBUG",
          ]
  
      self.ldflags_shared = ["/DLL", "/nologo", "/INCREMENTAL:NO"]
      if self.__version >= 7:
          self.ldflags_shared_debug = [
              "/DLL",
              "/nologo",
              "/INCREMENTAL:no",
              "/DEBUG",
          ]
      self.ldflags_static = ["/nologo"]
  
      self.initialized = True
  
imports: import os
  import subprocess
  import sys
  import re
  import warnings
  from .errors import DistutilsExecError, DistutilsPlatformError, CompileError, LibError, LinkError
  from .ccompiler import CCompiler, gen_lib_options
  from ._log import log
  from .util import get_platform
  import winreg
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