code: def _write_label_html(
      out,
      name,
      name_details,
      outer_class="sk-label-container",
      inner_class="sk-label",
      checked=False,
  ):
      """Write labeled html with or without a dropdown with named details"""
      out.write(
          f'<div class="{outer_class}"><div class="{inner_class} sk-toggleable">'
      )
      name = html.escape(name)
  
      if name_details is not None:
          name_details = html.escape(str(name_details))
          label_class = (
              "sk-toggleable__label sk-toggleable__label-arrow"
          )
  
          checked_str = "checked" if checked else ""
          est_id = _ESTIMATOR_ID_COUNTER.get_id()
          out.write(
              '<input class="sk-toggleable__control sk-hidden--visually" '
              f'id="{est_id}" type="checkbox" {checked_str}>'
              f'<label for="{est_id}" class="{label_class}">{name}</label>'
              f'<div class="sk-toggleable__content"><pre>{name_details}'
              "</pre></div>"
          )
      else:
          out.write(f"<label>{name}</label>")
      out.write("</div></div>")
  
file_path: catboost/contrib/python/scikit-learn/py3/sklearn/utils/_estimator_html_repr.py
imports: import html
  from contextlib import closing
  from inspect import isclass
  from io import StringIO
  from string import Template
  from ..None import config_context
label_desc: Use image node_id 1 for calling a global function with example usage: _write_label_html(out, name, name_details, outer_class, inner_class, checked) without return types