code: def _mac_platforms(version=None, arch=None):
      version_str, _, cpu_arch = platform.mac_ver()
      if version is None:
          version = tuple(map(int, version_str.split(".")[:2]))
      if arch is None:
          arch = _mac_arch(cpu_arch)
      platforms = []
      for minor_version in range(version[1], -1, -1):
          compat_version = version[0], minor_version
          binary_formats = _mac_binary_formats(compat_version, arch)
          for binary_format in binary_formats:
              platforms.append(
                  "macosx_{major}_{minor}_{binary_format}".format(
                      major=compat_version[0],
                      minor=compat_version[1],
                      binary_format=binary_format,
                  )
              )
      return platforms
  
imports: from __future__ import absolute_import
  import distutils.util
  import platform
  import re
  import sys
  import sysconfig
  import warnings
label_desc: Use image node_id 14 for calling a global function with example usage: _mac_platforms(version, arch) and returns: platforms