def test_stridden_conformal_model(self, config):
        """Checks correctness of naive conformal model historical forecasts for:
        - different horizons (smaller, equal and larger the OCL)
        - uni and multivariate series
        - single and multiple series
        - with and without output shift
        - with and without training length
        - with and without covariates
        """
        is_univar, is_single = True, False
        n, ocs, cal_length, cal_stride, use_start = config
        if ocs and n > OUT_LEN:
            # auto-regression not allowed with ocs
            return

        series = self.helper_prepare_series(is_univar, is_single)
        # shift second series ahead to cover the non overlapping multi series case
        series = [series[0], series[1].shift(120)]
        model_params = {"output_chunk_shift": ocs}

        # forecasts from forecasting model
        model_fc = train_model(series, model_params=model_params)
        hfc_fc_list = model_fc.historical_forecasts(
            series,
            retrain=False,
            forecast_horizon=n,
            overlap_end=True,
            last_points_only=False,
            stride=cal_stride,
        )
        # residuals to compute the conformal intervals
        residuals_list = model_fc.residuals(
            series,
            historical_forecasts=hfc_fc_list,
            overlap_end=True,
            last_points_only=False,
            values_only=True,
            metric=ae,  # absolute error
        )

        # conformal forecasts
        model = ConformalNaiveModel(
            model=model_fc,
            quantiles=q,
            cal_length=cal_length,
            cal_stride=cal_stride,
        )
        # the expected positional index of the first conformal forecast
        # index = (skip n + ocs points (relative to cal_stride) to avoid look-ahead bias) + (number of cal examples)
        first_fc_idx = math.ceil((n + ocs) / cal_stride) + (
            cal_length - 1 if cal_length else 0
        )
        first_start = n_steps_between(
            hfc_fc_list[0][first_fc_idx].start_time() - ocs * series[0].freq,
            series[0].start_time(),
            freq=series[0].freq,
        )

        hfc_conf_list = model.historical_forecasts(
            series=series,
            forecast_horizon=n,
            overlap_end=True,
            last_points_only=False,
            start=first_start if use_start else None,
            start_format="position" if use_start else "value",
            stride=cal_stride,
            **pred_lklp,
        )

        # also, skip some residuals from output chunk shift
        ignore_ocs = math.ceil(ocs / cal_stride) if ocs >= cal_stride else 0
        for hfc_fc, hfc_conf, hfc_residuals in zip(
            hfc_fc_list, hfc_conf_list, residuals_list
        ):
            for idx, (pred_fc, pred_cal) in enumerate(
                zip(hfc_fc[first_fc_idx:], hfc_conf)
            ):
                residuals = np.concatenate(
                    hfc_residuals[: first_fc_idx - ignore_ocs + idx], axis=2
                )
                pred_vals = pred_fc.all_values()
                pred_vals_expected = self.helper_compute_pred_cal(
                    residuals,
                    pred_vals,
                    n,
                    q,
                    cal_length=cal_length,
                    model_type="regression",
                    symmetric=True,
                    cal_stride=cal_stride,
                )
                assert pred_fc.time_index.equals(pred_cal.time_index)
                np.testing.assert_array_almost_equal(
                    pred_cal.all_values(), pred_vals_expected
                )

        # check that with a round-multiple of `cal_stride` we get identical forecasts
        assert model.historical_forecasts(
            series=series,
            forecast_horizon=n,
            overlap_end=True,
            last_points_only=False,
            start=first_start if use_start else None,
            start_format="position" if use_start else "value",
            stride=2 * cal_stride,
            **pred_lklp,
        ) == [hfc[::2] for hfc in hfc_conf_list]

        # checking that last points only is equal to the last forecasted point
        hfc_lpo_list = model.historical_forecasts(
            series=series,
            forecast_horizon=n,
            overlap_end=True,
            last_points_only=True,
            stride=cal_stride,
            **pred_lklp,
        )
        for hfc_lpo, hfc_conf in zip(hfc_lpo_list, hfc_conf_list):
            hfc_conf_lpo = concatenate(
                [hfc[-1::cal_stride] for hfc in hfc_conf], axis=0
            )
            assert hfc_lpo.time_index.equals(hfc_conf_lpo.time_index)
            assert hfc_lpo.columns.equals(hfc_conf_lpo.columns)
            np.testing.assert_array_almost_equal(
                hfc_lpo.all_values(), hfc_conf_lpo.all_values()
            )

        # checking that predict gives the same results as last historical forecast
        preds = model.predict(
            series=series,
            n=n,
            **pred_lklp,
        )
        hfcs_conf_end = model.historical_forecasts(
            series=series,
            forecast_horizon=n,
            overlap_end=True,
            last_points_only=False,
            start=-cal_stride,
            start_format="position",
            stride=cal_stride,
            **pred_lklp,
        )
        hfcs_conf_end = [hfc[-1] for hfc in hfcs_conf_end]
        for pred, last_hfc in zip(preds, hfcs_conf_end):
            assert pred.time_index.equals(last_hfc.time_index)
            assert pred.columns.equals(last_hfc.columns)
            np.testing.assert_array_almost_equal(
                pred.all_values(), last_hfc.all_values()
            )
Checks correctness of naive conformal model historical forecasts for:
        - different horizons (smaller, equal and larger the OCL)
        - uni and multivariate series
        - single and multiple series
        - with and without output shift
        - with and without training length
        - with and without covariates
        
darts/tests/models/forecasting/test_conformal_model.py