def test_feature_times_invalid_lag_values_error(self):
        """
        Tests that `_get_feature_times` throws correct error
        when provided with invalid lag values (i.e. not less than
        0 if `lags`, or not less than 1 if `lags_past_covariates` or
        `lags_future_covariates`).
        """
        series = linear_timeseries(start=1, length=3, freq=1)
        # `lags` not <= -1:
        with pytest.raises(ValueError) as err:
            _get_feature_times(target_series=series, lags=[0], is_training=False)
        assert (
            "`lags` must be a `Sequence` or `Dict` containing only `int` values less than 0."
        ) == str(err.value)
        # `lags_past_covariates` not <= -1:
        with pytest.raises(ValueError) as err:
            _get_feature_times(
                past_covariates=series, lags_past_covariates=[0], is_training=False
            )
        assert (
            "`lags_past_covariates` must be a `Sequence` or `Dict` containing only `int` values less than 0."
        ) == str(err.value)
        # `lags_future_covariates` can be positive, negative, and/or zero - no error should be thrown:
        _get_feature_times(
            future_covariates=series,
            lags_future_covariates=[-1, 0, 1],
            is_training=False,
        )

        Tests that `_get_feature_times` throws correct error
        when provided with invalid lag values (i.e. not less than
        0 if `lags`, or not less than 1 if `lags_past_covariates` or
        `lags_future_covariates`).
        
darts/tests/utils/tabularization/test_get_feature_times.py