def read_examples(source_file, target_file):
  """Return list of (source, target) tuples."""
  sources = []
  targets = []

  with gfile.GFile(source_file, "r") as txt_file:
    for line in txt_file:
      sources.append(line.rstrip("\n"))

  with gfile.GFile(target_file, "r") as txt_file:
    for line in txt_file:
      targets.append(line.rstrip("\n"))

  examples = list(zip(sources, targets))
  return examples
Return list of (source, target) tuples.
language/compgen/nqg/tasks/scan/join_txt_to_tsv.py