def test_lagged_training_data_single_lag_single_component_same_series(self, config):
        """
        Tests that `create_lagged_training_data` correctly produces `X`, `y` and `times`
        when all the `series` inputs are identical, all the `lags` inputs consist
        of a single value, and `output_chunk_length` is `1`. In this situation, the
        expected `X` values can be found by concatenating three different slices of the
        same time series, and the expected  `y` can be formed by taking a single slice
        from the `target`.
        """
        output_chunk_shift, use_moving_windows, series_type, stride = config
        if series_type == "integer":
            series = linear_timeseries(start=0, length=15)
        else:
            series = linear_timeseries(start=pd.Timestamp("1/1/2000"), length=15)

        lags = [-1]
        output_chunk_length = 1
        past_lags = [-3]
        future_lags = [2]
        # Can't create features for first 3 times (because `past_lags`) and last
        # two times (because `future_lags`):
        # also up until output_chunk_shift>=2, the future_lags are the reason for pushing back the end time
        # of expected X; after that the output shift pushes back additionally.
        step_back = max(0, output_chunk_shift - 2)
        expected_times_x = series.time_index[3 : -2 - step_back]
        expected_times_y = expected_times_x + output_chunk_shift * series.freq
        expected_y = series.all_values(copy=False)[
            3 + output_chunk_shift : 3 + output_chunk_shift + len(expected_times_y),
            :,
            :,
        ]
        # Offset `3:-2` by `-1` lag:
        expected_X_target = series.all_values(copy=False)[
            2 : 2 + len(expected_times_x), :, 0
        ]
        # Offset `3:-2` by `-3` lag -> gives `0:-5`:
        expected_X_past = series.all_values(copy=False)[: len(expected_times_x), :, 0]
        # Offset `3:-2` by `+2` lag -> gives `5:None`:
        expected_X_future = series.all_values(copy=False)[
            5 : 5 + len(expected_times_x), :, 0
        ]
        expected_X = np.concatenate(
            [expected_X_target, expected_X_past, expected_X_future], axis=1
        )
        expected_X = np.expand_dims(expected_X, axis=-1)

        if stride > 1:
            expected_X = expected_X[::-stride][::-1]
            expected_y = expected_y[::-stride][::-1]
            expected_times_x = expected_times_x[::-stride][::-1]
            expected_times_y = expected_times_y[::-stride][::-1]

        kwargs = {
            "expected_X": expected_X,
            "expected_y": expected_y,
            "expected_times_x": expected_times_x,
            "expected_times_y": expected_times_y,
            "target": series,
            "past_cov": series,
            "future_cov": series,
            "lags": lags,
            "lags_past": past_lags,
            "lags_future": future_lags,
            "output_chunk_length": output_chunk_length,
            "output_chunk_shift": output_chunk_shift,
            "use_static_covariates": False,
            "multi_models": True,
            "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 produces `X`, `y` and `times`
        when all the `series` inputs are identical, all the `lags` inputs consist
        of a single value, and `output_chunk_length` is `1`. In this situation, the
        expected `X` values can be found by concatenating three different slices of the
        same time series, and the expected  `y` can be formed by taking a single slice
        from the `target`.
        
darts/tests/utils/tabularization/test_create_lagged_training_data.py