class_docstr: The environment in which the ReST files are translated.
  Stores an inventory of cross-file targets and provides doctree
  transformations to resolve links to them.
class_docstr_tok: ["The","environment","in","which","the","ReST","files","are","translated",".","Stores","an","inventory","of","cross-file","targets","and","provides","doctree","transformations","to","resolve","links","to","them","."]
docstr: Resolve a *toctree* node into individual bullet lists with titles
  as items, returning None (if no containing titles are found) or
  a new node.
  
  If *prune* is True, the tree is pruned to *maxdepth*, or if that is 0,
  to the value of the *maxdepth* option on the *toctree* node.
  If *titles_only* is True, only toplevel document titles will be in the
  resulting tree.
  If *collapse* is True, all branches not containing docname will
  be collapsed.
code: def resolve_toctree(
      self,
      docname: str,
      builder: Builder,
      toctree: addnodes.toctree,
      prune: bool = True,
      maxdepth: int = 0,
      titles_only: bool = False,
      collapse: bool = False,
      includehidden: bool = False,
  ) -> Node | None:
      """Resolve a *toctree* node into individual bullet lists with titles
      as items, returning None (if no containing titles are found) or
      a new node.
  
      If *prune* is True, the tree is pruned to *maxdepth*, or if that is 0,
      to the value of the *maxdepth* option on the *toctree* node.
      If *titles_only* is True, only toplevel document titles will be in the
      resulting tree.
      If *collapse* is True, all branches not containing docname will
      be collapsed.
      """
      return toctree_adapters._resolve_toctree(
          self,
          docname,
          builder,
          toctree,
          prune=prune,
          maxdepth=maxdepth,
          titles_only=titles_only,
          collapse=collapse,
          includehidden=includehidden,
      )
  
imports: from __future__ import annotations
  import functools
  import os
  import pickle
  import time
  from collections import defaultdict
  from copy import copy
  from os import path
  from typing import TYPE_CHECKING, Any, Callable, NoReturn
  from sphinx import addnodes
  from sphinx.environment.adapters import toctree
  from sphinx.errors import BuildEnvironmentError, DocumentError, ExtensionError, SphinxError
  from sphinx.locale import __
  from sphinx.transforms import SphinxTransformer
  from sphinx.util import DownloadFiles, FilenameUniqDict, logging
  from sphinx.util.docutils import LoggingReporter
  from sphinx.util.i18n import CatalogRepository, docname_to_domain
  from sphinx.util.nodes import is_translatable
  from sphinx.util.osutil import canon_path, os_path
label_desc: Use image node_id 27 for calling the BuildEnvironment obj's underlying member method code with example usage: obj.resolve_toctree(docname, builder, toctree, prune, maxdepth, titles_only, collapse, includehidden) and returns: toctree_adapters