code: def cpython_tags(
      python_version=None,  # type: Optional[PythonVersion]
      abis=None,  # type: Optional[Iterable[str]]
      platforms=None,  # type: Optional[Iterable[str]]
      **kwargs,  # type: bool
  ):
      # type: (...) -> Iterator[Tag]
      """
      Yields the tags for a CPython interpreter.
  
      The tags consist of:
      - cp<python_version>-<abi>-<platform>
      - cp<python_version>-abi3-<platform>
      - cp<python_version>-none-<platform>
      - cp<less than python_version>-abi3-<platform>  # Older Python versions down to 3.2.
  
      If python_version only specifies a major version then user-provided ABIs and
      the 'none' ABItag will be used.
  
      If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
      their normal position and not at the beginning.
      """
      warn = _warn_keyword_parameter("cpython_tags", kwargs)
      if not python_version:
          python_version = sys.version_info[:2]
  
      interpreter = "cp{}".format(_version_nodot(python_version[:2]))
  
      if abis is None:
          if len(python_version) > 1:
              abis = _cpython_abis(python_version, warn)
          else:
              abis = []
      abis = list(abis)
      # 'abi3' and 'none' are explicitly handled later.
      for explicit_abi in ("abi3", "none"):
          try:
              abis.remove(explicit_abi)
          except ValueError:
              pass
  
      platforms = list(platforms or _platform_tags())
      for abi in abis:
          for platform_ in platforms:
              yield Tag(interpreter, abi, platform_)
      if _abi3_applies(python_version):
          for tag in (
              Tag(interpreter, "abi3", platform_)
              for platform_ in platforms
          ):
              yield tag
      for tag in (
          Tag(interpreter, "none", platform_) for platform_ in platforms
      ):
          yield tag
  
      if _abi3_applies(python_version):
          for minor_version in range(python_version[1] - 1, 1, -1):
              for platform_ in platforms:
                  interpreter = "cp{version}".format(
                      version=_version_nodot(
                          (python_version[0], minor_version)
                      )
                  )
                  yield Tag(interpreter, "abi3", platform_)
  
imports: from __future__ import absolute_import
  import distutils.util
  import collections
  import logging
  import os
  import platform
  import re
  import struct
  import sys
  import sysconfig
  import warnings
  from ._typing import TYPE_CHECKING, cast
label_desc: Use image node_id 7 for calling a global function with example usage: cpython_tags(python_version, abis, platforms) without return types