def load_data(train_data_path, test_data_path,
              prediction_path):
  """Loads train and test data, and possibly loads predictions."""
  train_examples = _load_examples(train_data_path)
  test_examples = _load_examples(test_data_path)
  if prediction_path:
    predictions = _load_predictions(prediction_path)
    num_predictions = len(predictions)
    num_test_examples = len(test_examples)
    if num_predictions != num_test_examples:
      raise RuntimeError(
          "#predictions ({}) must equal #test_examples ({})!".format(
              num_predictions, num_test_examples))
  else:
    predictions = None
  return train_examples, test_examples, predictions
Loads train and test data, and possibly loads predictions.
language/compir/utils/io_utils.py