def test_get_estimator_quantile(self, multi_models):
        """Check estimator getter when using quantile value"""
        ocl = 3
        lags = 3
        quantiles = [0.01, 0.5, 0.99]
        ts = tg.sine_timeseries(length=100, column_name="sine").stack(
            tg.linear_timeseries(length=100, column_name="linear"),
        )

        m = XGBModel(
            lags=lags,
            output_chunk_length=ocl,
            multi_models=multi_models,
            likelihood="quantile",
            quantiles=quantiles,
            random_state=1,
        )
        m.fit(ts)

        assert len(m._model_container) == len(quantiles)
        assert sorted(list(m._model_container.keys())) == sorted(quantiles)
        for quantile_container in m._model_container.values():
            # one sub-model per quantile, per component, per horizon
            if multi_models:
                assert len(quantile_container.estimators_) == ocl * ts.width
            # one sub-model per quantile, per component
            else:
                assert len(quantile_container.estimators_) == ts.width

        # check that retrieve sub-models prediction match the "wrapper" model predictions
        pred_input = ts[-lags:] if multi_models else ts[-lags - ocl + 1 :]
        pred = m.predict(
            n=ocl,
            series=pred_input,
            num_samples=1,
            predict_likelihood_parameters=True,
        )
        for j in range(ts.width):
            for i in range(ocl):
                if multi_models:
                    dummy_feats = pred_input.values()[:lags]
                else:
                    dummy_feats = pred_input.values()[i : +i + lags]
                dummy_feats = np.expand_dims(dummy_feats.flatten(), 0)
                for q in quantiles:
                    sub_model = m.get_estimator(horizon=i, target_dim=j, quantile=q)
                    pred_sub_model = sub_model.predict(dummy_feats)[0]
                    assert (
                        pred_sub_model
                        == pred[f"{ts.components[j]}_q{q:.2f}"].values()[i][0]
                    )
Check estimator getter when using quantile value
darts/tests/models/forecasting/test_sklearn_models.py