class_docstr: Internal class for formatting output data in html.
  This class is intended for shared functionality between
  DataFrame.to_html() and DataFrame._repr_html_().
  Any logic in common with other output formatting methods
  should ideally be inherited from classes in format.py
  and this class responsible for only producing html markup.
code: def __init__(
      self,
      formatter: DataFrameFormatter,
      classes: str | list[str] | tuple[str, ...] | None = None,
      border: int | bool | None = None,
      table_id: str | None = None,
      render_links: bool = False,
  ) -> None:
      self.fmt = formatter
      self.classes = classes
  
      self.frame = self.fmt.frame
      self.columns = self.fmt.tr_frame.columns
      self.elements: list[str] = []
      self.bold_rows = self.fmt.bold_rows
      self.escape = self.fmt.escape
      self.show_dimensions = self.fmt.show_dimensions
      if border is None or border is True:
          border = cast(int, get_option("display.html.border"))
      elif not border:
          border = None
  
      self.border = border
      self.table_id = table_id
      self.render_links = render_links
  
      self.col_space = {
          column: f"{value}px" if isinstance(value, int) else value
          for column, value in self.fmt.col_space.items()
      }
  
imports: from __future__ import annotations
  from textwrap import dedent
  from typing import Any, Final, Hashable, Iterable, Mapping, cast
  from pandas._config import get_option
  from pandas._libs import lib
  from pandas import MultiIndex, option_context
  from pandas.io.common import is_url
  from pandas.io.formats.format import DataFrameFormatter, get_level_lengths
  from pandas.io.formats.printing import pprint_thing
label_desc: Use image node_id 1 to create a new HTMLFormatter object  with example: obj = HTMLFormatter(formatter, classes, border, table_id, render_links)