class_docstr: Extract raw HTML from text.
  
  The raw HTML is stored in the [`htmlStash`][markdown.util.HtmlStash] of the
  [`Markdown`][markdown.Markdown] instance passed to `md` and the remaining text
  is stored in `cleandoc` as a list of strings.
docstr: Returns the text of the end tag.
  
  If it fails to extract the actual text from the raw data, it builds a closing tag with `tag`.
docstr_tok: ["Returns","the","text","of","the","end","tag",".","If","it","fails","to","extract","the","actual","text","from","the","raw","data",",","it","builds","a","closing","tag","with","`","tag","`","."]
code: def get_endtag_text(self, tag: str) -> str:
      """
      Returns the text of the end tag.
  
      If it fails to extract the actual text from the raw data, it builds a closing tag with `tag`.
      """
      # Attempt to extract actual tag from raw source text
      start = self.line_offset + self.offset
      m = htmlparser.endendtag.search(self.rawdata, start)
      if m:
          return self.rawdata[start : m.end()]
      else:  # pragma: no cover
          # Failed to extract from raw data. Assume well formed and lowercase.
          return "</{}>".format(tag)
  
imports: from __future__ import annotations
  import re
  import importlib.util
  import sys
  from typing import TYPE_CHECKING, Sequence
label_desc: Use image node_id 6 for calling the HTMLExtractor obj's underlying member method code with example usage: obj.get_endtag_text(tag) and returns: self, str