def test_feature_times_training_single_time(self, config):
        """
        Tests that `_get_feature_times` correctly handles case where only
        a single time can be used to create training features and labels.
        This particular test uses range index timeseries.
        """
        # Can only create feature and label for time `1` (`-1` lag behind is time `0`):
        series_type, output_chunk_shift = config
        if series_type == "integer":
            target = linear_timeseries(start=0, length=2 + output_chunk_shift, freq=1)
            # Can only create feature for time `6` (`-2` lags behind is time `2`):
            future = linear_timeseries(start=2, length=1, freq=2)
            exp_start_target, exp_start_future = 1, 6
        else:
            target = linear_timeseries(
                start=pd.Timestamp("1/1/2000"), length=2 + output_chunk_shift, freq="d"
            )
            # Can only create feature for "1/6/2000" (`-2` lags behind is "1/2/2000"):
            future = linear_timeseries(
                start=pd.Timestamp("1/2/2000"), length=1, freq="2d"
            )
            exp_start_target, exp_start_future = (
                pd.Timestamp("1/2/2000"),
                pd.Timestamp("1/6/2000"),
            )

        lags = [-1]
        feature_times = _get_feature_times(
            target_series=target,
            output_chunk_length=1,
            lags=lags,
            is_training=True,
            output_chunk_shift=output_chunk_shift,
        )
        assert len(feature_times[0]) == 1
        assert feature_times[0][0] == exp_start_target

        future_lags = [-2]
        feature_times = _get_feature_times(
            target_series=target,
            future_covariates=future,
            output_chunk_length=1,
            lags=lags,
            lags_future_covariates=future_lags,
            is_training=True,
            output_chunk_shift=output_chunk_shift,
        )
        assert len(feature_times[0]) == 1
        assert feature_times[0][0] == exp_start_target
        assert len(feature_times[2]) == 1
        assert feature_times[2][0] == exp_start_future

        Tests that `_get_feature_times` correctly handles case where only
        a single time can be used to create training features and labels.
        This particular test uses range index timeseries.
        
darts/tests/utils/tabularization/test_get_feature_times.py