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 end of every HTML tag.
docstr_tok: ["Called","at","the","end","of","every","HTML","tag","."]
code: def handle_endtag(self, tag: str) -> None:
      """Called at the end of every HTML tag."""
      # We only care about the opening tag for headings.
      if tag not in _HEADER_TAGS:
          return
  
      self.is_header_tag = False
  
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 3 for calling the ContentParser obj's underlying member method code with example usage: obj.handle_endtag(tag) without return types