def f_reversible(self, example):
    """Transforms a single program to its reversible IR."""

    if "and" in example.utterance:
      return self._bracket_complex_action(example.utterance, "and")
    elif "after" in example.utterance:
      return self._bracket_complex_action(example.utterance, "after")
    else:
      return "( {} )".format(
          self._bracket_atomic_action(example.utterance, example.program))
Transforms a single program to its reversible IR.
language/compir/dataset_parsers/scan_parser.py