class_docstr: This class helps with formatting text-based help pages.  It's
  usually just needed for very special internal cases, but it's also
  exposed so that developers can write their own fancy outputs.
  
  At present, it always writes into memory.
  
  :param indent_increment: the additional increment for each level.
  :param width: the width for the text.  This defaults to the terminal
                width clamped to a maximum of 78.
docstr: Writes a definition list into the buffer.  This is how options
  and commands are usually formatted.
  
  :param rows: a list of two item tuples for the terms and values.
  :param col_max: the maximum width of the first column.
  :param col_spacing: the number of spaces between the first and
                      second column.
docstr_tok: ["Writes","a","definition","list","into","the","buffer",".","This","is","how","options","and","commands","are","usually","formatted",".",":","param","rows",":","a","list","of","two","item","tuples","for","the","terms","and","values",".",":","param","col_max",":","the","maximum","width","of","the","first","column",".",":","param","col_spacing",":","the","number","of","spaces","between","the","first","and","second","column","."]
code: def write_dl(
      self,
      rows: t.Sequence[t.Tuple[str, str]],
      col_max: int = 30,
      col_spacing: int = 2,
  ) -> None:
      """Writes a definition list into the buffer.  This is how options
      and commands are usually formatted.
  
      :param rows: a list of two item tuples for the terms and values.
      :param col_max: the maximum width of the first column.
      :param col_spacing: the number of spaces between the first and
                          second column.
      """
      rows = list(rows)
      widths = measure_table(rows)
      if len(widths) != 2:
          raise TypeError("Expected two columns for definition list")
  
      first_col = min(widths[0], col_max) + col_spacing
  
      for first, second in iter_rows(rows, len(widths)):
          self.write(f"{'':>{self.current_indent}}{first}")
          if not second:
              self.write("\n")
              continue
          if term_len(first) <= first_col - col_spacing:
              self.write(" " * (first_col - term_len(first)))
          else:
              self.write("\n")
              self.write(" " * (first_col + self.current_indent))
  
          text_width = max(self.width - first_col - 2, 10)
          wrapped_text = wrap_text(
              second, text_width, preserve_paragraphs=True
          )
          lines = wrapped_text.splitlines()
  
          if lines:
              self.write(f"{lines[0]}\n")
  
              for line in lines[1:]:
                  self.write(
                      f"{'':>{first_col + self.current_indent}}{line}\n"
                  )
          else:
              self.write("\n")
  
imports: import typing
  from contextlib import contextmanager
  from gettext import gettext
  from ._compat import term_len
  from .parser import split_opt
label_desc: Use image node_id 9 for calling the HelpFormatter obj's underlying member method code with example usage: obj.write_dl(rows, col_max, col_spacing) without return types