code: def safe_extra(extra: str) -> str:
      """Normalize extra name according to PEP 685
      >>> safe_extra("_FrIeNdLy-._.-bArD")
      'friendly-bard'
      >>> safe_extra("FrIeNdLy-._.-bArD__._-")
      'friendly-bard'
      """
      return _NON_ALPHANUMERIC.sub("-", extra).strip("-").lower()
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/_normalization.py
imports: import re
  from pathlib import Path
  from typing import Union
  from .extern import packaging
label_desc: Use image node_id 5 for calling a global function with example usage: safe_extra(extra) and returns: _NON_ALPHANUMERIC