class_docstr: Implements lit.Model interface for a set of pre-computed predictions.
class_docstr_tok: ["Implements","lit.Model","interface","for","a","set","of","pre-computed","predictions","."]
code: def _predict_single(self, example: JsonDict):
      key = self.key_fn(example)
      if key not in self._index:
          raise KeyError(
              f"Example {key} not found in stored predictions: {str(example)}"
          )
      return self._index[key]
  
file_path: lit/lit_nlp/components/static_preds.py
imports: from collections.abc import Iterable, Iterator
  from typing import Optional
  from lit_nlp.api import dataset
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.lib import caching
label_desc: Use image node_id 5 for calling the StaticPredictions obj's underlying member method code with example usage: obj._predict_single(example) and returns: self