class_docstr: A StandaloneHTMLBuilder subclass that puts the whole document tree on one
  HTML page.
class_docstr_tok: ["A","StandaloneHTMLBuilder","subclass","that","puts","the","whole","document","tree","on","one","HTML","page","."]
code: def _get_local_toctree(
      self, docname: str, collapse: bool = True, **kwargs: Any
  ) -> str:
      if isinstance(includehidden := kwargs.get("includehidden"), str):
          if includehidden.lower() == "false":
              kwargs["includehidden"] = False
          elif includehidden.lower() == "true":
              kwargs["includehidden"] = True
      if kwargs.get("maxdepth") == "":
          kwargs.pop("maxdepth")
      toctree = global_toctree_for_doc(
          self.env, docname, self, collapse=collapse, **kwargs
      )
      if toctree is not None:
          self.fix_refuris(toctree)
      return self.render_partial(toctree)["fragment"]
  
imports: from __future__ import annotations
  from os import path
  from typing import TYPE_CHECKING, Any
  from docutils import nodes
  from sphinx.builders.html import StandaloneHTMLBuilder
  from sphinx.environment.adapters.toctree import global_toctree_for_doc
  from sphinx.locale import __
  from sphinx.util import logging
  from sphinx.util.console import darkgreen
  from sphinx.util.display import progress_message
  from sphinx.util.nodes import inline_all_toctrees
label_desc: Use image node_id 5 for calling the SingleFileHTMLBuilder obj's underlying member method code with example usage: obj._get_local_toctree(docname, collapse) and returns: self