def verify_exemplars(self, example: RawExample) -> None:
    """Filters out an example's exemplars that are not in the index.

    Args:
      example: an Example. The "exemplars" field will be modified in-place.
    """
    if "exemplars" not in example:
      # No retrieval (for the query_only converter).
      return
    filtered_hashed_ids = []
    filtered_distances = []
    for hashed_id, distance in zip(example["exemplars"]["hashed_ids"],
                                   example["exemplars"]["distances"]):
      if hashed_id not in self._hashed_id_to_exemplar:
        logging.warn("Example %s: Exemplar hashed ID %s is not in the index.",
                     example["hashed_id"], hashed_id)
      else:
        filtered_hashed_ids.append(hashed_id)
        filtered_distances.append(distance)
    example["exemplars"]["hashed_ids"] = filtered_hashed_ids
    example["exemplars"]["distances"] = filtered_distances
Filters out an example's exemplars that are not in the index.

    Args:
      example: an Example. The "exemplars" field will be modified in-place.
    
language/casper/augment/casper_converters.py