def _format_tables(self, input_path):
    """helper function to get the tables in parent format for a file."""
    prec_tables = []
    rec_tables = []
    with open(input_path, "r", encoding="utf-8") as input_file:
      for line in input_file:
        line = six.ensure_text(line, "utf-8")
        json_example = json.loads(line)
        (table_prec, table_rec, overlap_table_prec, overlap_table_rec,
         nonoverlap_table_prec, nonoverlap_table_rec) = (
             prepare_references_for_eval.get_parent_tables(json_example, "dev"))
        del (overlap_table_prec, overlap_table_rec, nonoverlap_table_prec,
             nonoverlap_table_rec)

        prec_entries = table_prec.lower().split("\t")
        rec_entries = table_rec.lower().split("\t")

        # pylint: disable=g-complex-comprehension
        prec_table_tokens = [[
            totto_parent_eval._normalize_text(member).split()
            for member in entry.split("|||")
        ]
                             for entry in prec_entries]

        rec_table_tokens = [[
            totto_parent_eval._normalize_text(member).split()
            for member in entry.split("|||")
        ]
                            for entry in rec_entries]

        prec_tables.append(prec_table_tokens)
        rec_tables.append(rec_table_tokens)
    return prec_tables, rec_tables
helper function to get the tables in parent format for a file.
language/totto/eval_pipeline_test.py