def convert(self, example: RawExample) -> Iterator[AugmentedExample]:
    """Takes the retrieval results of an example and yields seq2seq examples.

    Args:
      example: a RawExample.

    Yields:
      AugmentedExample, one for each seq2seq example.
    """
    example = self._preprocess_example(example)
    for hashed_ids in self._select_exemplars(example):
      exemplars = [
          self._hashed_id_to_exemplar[hashed_id] for hashed_id in hashed_ids
      ]
      input_str, output_str = self._augment_exemplars(example, exemplars)
      yield AugmentedExample(input_str, output_str)
Takes the retrieval results of an example and yields seq2seq examples.

    Args:
      example: a RawExample.

    Yields:
      AugmentedExample, one for each seq2seq example.
    
language/casper/augment/casper_converters.py