def METHOD_NAME(self, filepath):
    """Yields examples."""
    with open(filepath, encoding="utf-8") as f:
        examples_to_process = json.load(f)
        for i, example in enumerate(examples_to_process):
            query_text = example["question"]
            if self.config.include_title:
                passage = (
                    example["positive_ctxs"][0]["title"]
                    + " "
                    + example["positive_ctxs"][0]["text"]
                )
            else:
                passage = example["positive_ctxs"][0]["text"]
            gold_passage = passage
            if self.config.hard_negatives:
                if example["hard_negative_ctxs"]:
                    if self.config.include_title:
                        hard_passage = (
                            example["hard_negative_ctxs"][0]["title"]
                            + " "
                            + example["hard_negative_ctxs"][0]["text"]
                        )
                    else:
                        hard_passage = example["hard_negative_ctxs"][0]["text"]
                    hard_negatives = hard_passage
                elif example["negative_ctxs"]:
                    if self.config.include_title:
                        hard_passage = (
                            example["negative_ctxs"][0]["title"]
                            + " "
                            + example["negative_ctxs"][0]["text"]
                        )
                    else:
                        hard_passage = example["negative_ctxs"][0]["text"]
                    hard_negatives = hard_passage
                else:
                    continue
                yield i, {
                    "query_text": query_text,
                    "gold_passage": gold_passage,
                    "hard_negative": hard_negatives,
                }
            else:
                yield i, {
                    "query_text": query_text,
                    "gold_passage": gold_passage,
                }