def validate_correct_indices()

in project/nanoeval/nanoeval/solvers/mcq.py [0:0]


    def validate_correct_indices(self) -> Self:
        answers, correct_indices = self.answers, self.correct_indices
        assert answers is not None and correct_indices is not None
        if not all(0 <= i < len(answers) for i in correct_indices):
            raise ValueError(
                "Each element of correct_indices must be within the range of the answers list."
            )
        return self