def to_reversible(self):
    """Transforms all examples to their reversible intermediate representation."""

    def get_rir_examples(examples):
      return [
          Example(example.utterance, self.f_reversible(example))
          for example in examples
      ]

    return get_rir_examples(self.train_examples), get_rir_examples(
        self.test_examples)
Transforms all examples to their reversible intermediate representation.
language/compir/dataset_parsers/dataset_parser.py