def get_text(value):
  """Retrieves text from article pairs w/ logic for new articles."""
  if value["source_article"]:
    source_text = value["source_article"]["text"]
  else:
    source_text = ""
  target_text = value["target_article"]["text"]
  return source_text, target_text
Retrieves text from article pairs w/ logic for new articles.
language/fruit/beam_pipelines.py