class_docstr: Helper class that creates a search index based on the doctrees
  passed to the `feed` method.
class_docstr_tok: ["Helper","class","that","creates","a","search","index","based","on","the","doctrees","passed","to","the","`","feed","`","method","."]
docstr: Reconstruct from frozen data.
docstr_tok: ["Reconstruct","from","frozen","data","."]
code: def load(self, stream: IO, format: Any) -> None:
      """Reconstruct from frozen data."""
      if isinstance(format, str):
          format = self.formats[format]
      frozen = format.load(stream)
      # if an old index is present, we treat it as not existing.
      if (
          not isinstance(frozen, dict)
          or frozen.get("envversion") != self.env.version
      ):
          raise ValueError("old format")
      index2fn = frozen["docnames"]
      self._filenames = dict(zip(index2fn, frozen["filenames"]))
      self._titles = dict(zip(index2fn, frozen["titles"]))
      self._all_titles = {}
  
      for docname in self._titles.keys():
          self._all_titles[docname] = []
      for title, doc_tuples in frozen["alltitles"].items():
          for doc, titleid in doc_tuples:
              self._all_titles[index2fn[doc]].append((title, titleid))
  
      def load_terms(mapping: dict[str, Any]) -> dict[str, set[str]]:
          rv = {}
          for k, v in mapping.items():
              if isinstance(v, int):
                  rv[k] = {index2fn[v]}
              else:
                  rv[k] = {index2fn[i] for i in v}
          return rv
  
      self._mapping = load_terms(frozen["terms"])
      self._title_mapping = load_terms(frozen["titleterms"])
  
imports: from __future__ import annotations
  import dataclasses
  import functools
  import html
  import json
  import pickle
  import re
  from importlib import import_module
  from os import path
  from typing import IO, TYPE_CHECKING, Any
  from docutils import nodes
  from docutils.nodes import Element, Node
  from sphinx import addnodes, package_dir
  from sphinx.environment import BuildEnvironment
  from sphinx.util.index_entries import split_index_msg
  from sphinx.search.en import SearchEnglish
label_desc: Use image node_id 2 for calling the IndexBuilder obj's underlying member method code with example usage: obj.load(stream, format) and returns: rv