code: def get_abi_tag():
      
      soabi = get_config_var('SOABI')
      impl = get_abbr_impl()
      if not soabi and impl in {'cp', 'pp'} and hasattr(sys, 'maxunicode'):
          d = ''
          m = ''
          u = ''
          if get_flag('Py_DEBUG',
                      lambda: hasattr(sys, 'gettotalrefcount'),
                      warn=(impl == 'cp')):
              d = 'd'
          if get_flag('WITH_PYMALLOC',
                      lambda: impl == 'cp',
                      warn=(impl == 'cp')):
              m = 'm'
  
          # NB: Modified from ~ `from .extern import six; six.PY2`
          PY2 = sys.version_info[0] == 2
          if (get_flag('Py_UNICODE_SIZE',
                       lambda: sys.maxunicode == 0x10ffff,
                       expected=4,
                       warn=(impl == 'cp' and PY2)) and PY2):
              u = 'u'
  
          abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u)
      elif soabi and soabi.startswith('cpython-'):
          abi = 'cp' + soabi.split('-')[1]
      elif soabi:
          abi = soabi.replace('.', '_').replace('-', '_')
      else:
          abi = None
      return abi
docs: Return the ABI tag based on SOABI (if available) or emulate SOABI
      (CPython 2, PyPy).