code: def format_aliases(aliases: list[str]) -> str:
      fmted = []
      for a in aliases:
          dashes = "-" if len(a) == 1 else "--"
          fmted.append(f"``{dashes}{a}``")
      return ", ".join(fmted)
  
file_path: catboost/contrib/python/traitlets/py3/traitlets/config/sphinxdoc.py
imports: from __future__ import annotations
  import typing
  from collections import defaultdict
  from textwrap import dedent
  from traitlets import HasTraits, Undefined
  from traitlets.config.application import Application
  from traitlets.utils.text import indent
label_desc: Use image node_id 3 for calling a global function with example usage: format_aliases(aliases) and returns: str