class_docstr: Given a block of HTML, group the content under the preceding
  heading tags which can then be used for creating an index
  for that section.
docstr: Called at the start of every HTML tag.
docstr_tok: ["Called","at","the","start","of","every","HTML","tag","."]
code: def handle_starttag(
      self, tag: str, attrs: list[tuple[str, str | None]]
  ) -> None:
      """Called at the start of every HTML tag."""
      # We only care about the opening tag for headings.
      if tag not in _HEADER_TAGS:
          return
  
      # We are dealing with a new header, create a new section
      # for it and assign the ID if it has one.
      self.is_header_tag = True
      self.section = ContentSection()
      self.data.append(self.section)
  
      for attr in attrs:
          if attr[0] == "id":
              self.section.id = attr[1]
  
imports: from __future__ import annotations
  import json
  import logging
  import os
  import re
  import subprocess
  from html.parser import HTMLParser
  from typing import TYPE_CHECKING
label_desc: Use image node_id 2 for calling the ContentParser obj's underlying member method code with example usage: obj.handle_starttag(tag, attrs) without return types