code: def safe_identifier(name: str) -> str:
      """Make a string safe to be used as Python identifier.
      >>> safe_identifier("12abc")
      '_12abc'
      >>> safe_identifier("__editable__.myns.pkg-78.9.3_local")
      '__editable___myns_pkg_78_9_3_local'
      """
      safe = re.sub(r"\W|^(?=\d)", "_", name)
      assert safe.isidentifier()
      return safe
  
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 1 for calling a global function with example usage: safe_identifier(name) and returns: safe