def _check_calibrated(self) -> None:
        """
        Check that the model has been calibrated beforehand.
        """
        if self.state is None:
            raise ValueError(
                "No calibration state was found. The model must be calibrated beforehand."
            )

        Check that the model has been calibrated beforehand.
        
fortuna/output_calib_model/predictive/base.py