def METHOD_NAME():
  global vs_version
  if vs_version:
    return vs_version
  # Try using the toolchain in depot_tools.
  # This sets environment variables used by SelectVisualStudioVersion below.
  sys.path.append(THIS_DIR)
  import vs_toolchain
  vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
  # Use gyp to find the MSVS installation, either in depot_tools as per above,
  # or a system-wide installation otherwise.
  sys.path.append(os.path.join(THIS_DIR, 'gyp', 'pylib'))
  import gyp.MSVSVersion
  vs_version = gyp.MSVSVersion.SelectVisualStudioVersion(
      vs_toolchain.GetVisualStudioVersion())
  return vs_version