import json


def read_candidates_from_one_split(file_obj):
  """Read candidates from a single jsonl file."""
  candidates_dict = {}
  for line in file_obj:
    json_dict = json.loads(line)
    candidates_dict[
        json_dict["example_id"]] = json_dict["passage_answer_candidates"]
  return candidates_dict