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: Read the doctree for a file from the pickle and return it.
code: def get_doctree(self, docname: str) -> nodes.document:
      """Read the doctree for a file from the pickle and return it."""
      try:
          serialised = self._pickled_doctree_cache[docname]
      except KeyError:
          filename = path.join(self.doctreedir, docname + ".doctree")
          with open(filename, "rb") as f:
              serialised = self._pickled_doctree_cache[
                  docname
              ] = f.read()
  
      doctree = pickle.loads(serialised)
      doctree.settings.env = self
      doctree.reporter = LoggingReporter(self.doc2path(docname))
      return doctree
  
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 24 for calling the BuildEnvironment obj's underlying member method code with example usage: obj.get_doctree(docname) and returns: doctree