code: def find_msvs():
      root = os.environ.get("ProgramFiles(x86)") or os.environ.get(
          "ProgramFiles"
      )
      if not root:
          print("Program Files not found")
          return None
  
      try:
          vspath = (
              subprocess.check_output(
                  [
                      os.path.join(
                          root,
                          "Microsoft Visual Studio",
                          "Installer",
                          "vswhere.exe",
                      ),
                      "-latest",
                      "-prerelease",
                      "-requires",
                      "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
                      "-property",
                      "installationPath",
                      "-products",
                      "*",
                  ]
              )
              .decode(encoding="mbcs")
              .strip()
          )
      except (
          subprocess.CalledProcessError,
          OSError,
          UnicodeDecodeError,
      ):
          print("vswhere not found")
          return None
  
      if not os.path.isdir(
          os.path.join(vspath, "VC", "Auxiliary", "Build")
      ):
          print("Visual Studio seems to be missing C compiler")
          return None
  
      vs = {
          "header": [],
          # nmake selected by vcvarsall
          "nmake": "nmake.exe",
          "vs_dir": vspath,
      }
  
      # vs2017
      msbuild = os.path.join(
          vspath, "MSBuild", "15.0", "Bin", "MSBuild.exe"
      )
      if os.path.isfile(msbuild):
          vs["msbuild"] = f'"{msbuild}"'
      else:
          # vs2019
          msbuild = os.path.join(
              vspath, "MSBuild", "Current", "Bin", "MSBuild.exe"
          )
          if os.path.isfile(msbuild):
              vs["msbuild"] = f'"{msbuild}"'
          else:
              print("Visual Studio MSBuild not found")
              return None
  
      vcvarsall = os.path.join(
          vspath, "VC", "Auxiliary", "Build", "vcvarsall.bat"
      )
      if not os.path.isfile(vcvarsall):
          print("Visual Studio vcvarsall not found")
          return None
      vs["header"].append(f'call "{vcvarsall}" {{vcvars_arch}}')
  
      return vs
  
imports: import os
  import shutil
  import struct
  import subprocess
  import sys
label_desc: Use image node_id 11 for calling a global function with example usage: find_msvs() and returns: vs, None, None, None, None, None