def METHOD_NAME(self, split: str, path: str, contrast_map: dict) -> List[Instance]:
    split_instances: List[Instance] = []
    with open(path, "r") as f:
        all_triplets = list(f)
        for item in all_triplets:
            triplet: Dict = json.loads(item)
            passage: str = triplet["passage"]
            question: str = triplet["question"]
            answer: bool = triplet["answer"]
            correct_answer: str = "Yes" if answer else "No"
            input: Input = self.get_context(passage, question)
            contrast_inputs: Optional[List[Input]] = None
            contrast_references: Optional[List[List[Reference]]] = None
            if question in contrast_map:
                assert correct_answer == contrast_map[question]["original_answer"]
                contrast_inputs = [
                    self.get_context(passage, q) for q in contrast_map[question]["perturbed_questions"]
                ]
                contrast_references = [
                    [Reference(Output(text=perturbed_answer), tags=[CORRECT_TAG])]
                    for perturbed_answer in contrast_map[question]["perturbed_answers"]
                ]
            elif self.only_contrast and split == VALID_SPLIT:
                continue
            instance: Instance = Instance(
                input=input,
                references=[Reference(Output(text=correct_answer), tags=[CORRECT_TAG])],
                split=split,
                contrast_inputs=contrast_inputs,
                contrast_references=contrast_references,
            )
            split_instances.append(instance)
    return split_instances