code: def get_macosx_target_ver_from_syscfg():
      """Get the version of macOS latched in the Python interpreter configuration.
      Returns the version as a string or None if can't obtain one. Cached.
      """
      global _syscfg_macosx_ver
      if _syscfg_macosx_ver is None:
          from distutils import sysconfig
  
          ver = sysconfig.get_config_var(MACOSX_VERSION_VAR) or ""
          if ver:
              _syscfg_macosx_ver = ver
      return _syscfg_macosx_ver
  
imports: import importlib.util
  import os
  import re
  import string
  import subprocess
  import sys
  import sysconfig
  import functools
  from .errors import DistutilsPlatformError, DistutilsByteCompileError
  from ._modified import newer
  from .spawn import spawn
  from ._log import log
label_desc: Use image node_id 4 for calling a global function with example usage: get_macosx_target_ver_from_syscfg() and returns: _syscfg_macosx_ver