def test_lagged_training_data_single_point(self, config):
        """
        Tests that `create_lagged_training_data` correctly handles case
        where only one possible training point can be generated.
        """
        output_chunk_shift, use_moving_windows, series_type, multi_models, stride = (
            config
        )
        # Can only create feature using first value of series (i.e. `0`)
        # and can only create label using last value of series (i.e. `1`)
        if series_type == "integer":
            target = linear_timeseries(
                start=0, length=2 + output_chunk_shift, start_value=0, end_value=1
            )
        else:
            target = linear_timeseries(
                start=pd.Timestamp("1/1/2000"),
                length=2 + output_chunk_shift,
                start_value=0,
                end_value=1,
            )

        output_chunk_length = 1
        lags = [-1]
        expected_X = np.zeros((1, 1, 1))
        expected_y = np.ones((1, 1, 1))
        expected_times = generate_index(
            start=target.end_time() - output_chunk_shift * target.freq,
            length=1,
            freq=target.freq,
        )
        if stride > 1:
            expected_X = expected_X[::-stride][::-1]
            expected_y = expected_y[::-stride][::-1]
            expected_times = expected_times[::-stride][::-1]

        # Test correctness for 'moving window' and for 'time intersection' methods, as well
        # as for different `multi_models` values:
        kwargs = {
            "expected_X": expected_X,
            "expected_y": expected_y,
            "expected_times_x": expected_times,
            "expected_times_y": expected_times,
            "target": target,
            "past_cov": None,
            "future_cov": None,
            "lags": lags,
            "lags_past": None,
            "lags_future": None,
            "output_chunk_length": output_chunk_length,
            "output_chunk_shift": output_chunk_shift,
            "use_static_covariates": False,
            "multi_models": multi_models,
            "max_samples_per_ts": None,
            "use_moving_windows": use_moving_windows,
            "concatenate": True,
            "stride": stride,
        }

        self.helper_check_lagged_data(convert_lags_to_dict=False, **kwargs)

        if use_moving_windows:
            self.helper_check_lagged_data(convert_lags_to_dict=True, **kwargs)
        else:
            with pytest.raises(ValueError) as err:
                self.helper_check_lagged_data(convert_lags_to_dict=True, **kwargs)
            assert str(err.value).startswith(
                "`use_moving_windows=False` is not supported when any of the lags"
            )

        Tests that `create_lagged_training_data` correctly handles case
        where only one possible training point can be generated.
        
darts/tests/utils/tabularization/test_create_lagged_training_data.py