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","."]
code: def get_terms(
      self, fn2index: dict
  ) -> tuple[dict[str, list[str]], dict[str, list[str]]]:
      rvs: tuple[dict[str, list[str]], dict[str, list[str]]] = ({}, {})
      for rv, mapping in zip(rvs, (self._mapping, self._title_mapping)):
          for k, v in mapping.items():
              if len(v) == 1:
                  (fn,) = v
                  if fn in fn2index:
                      rv[k] = fn2index[fn]
              else:
                  rv[k] = sorted(
                      [fn2index[fn] for fn in v if fn in fn2index]
                  )
      return rvs
  
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 5 for calling the IndexBuilder obj's underlying member method code with example usage: obj.get_terms(fn2index) and returns: rvs