code: def safe_name(component: str) -> str:
      """Escape a component used as a project name according to Core Metadata.
      >>> safe_name("hello world")
      'hello-world'
      >>> safe_name("hello?world")
      'hello-world'
      >>> safe_name("hello_world")
      'hello_world'
      """
      # See pkg_resources.safe_name
      return _UNSAFE_NAME_CHARS.sub("-", component)
  
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 2 for calling a global function with example usage: safe_name(component) and returns: _UNSAFE_NAME_CHARS