class_docstr: Tests `create_lagged_prediction_data` function defined in `darts.utils.data.tabularization`. There
  are broadly two 'groups' of tests defined in this module:
      1. 'Generated Test Cases': these test that `create_lagged_prediction_data` produces the same outputs
      as a simplified implementation of the 'time intersection' feature generation method (see
      `darts.utils.data.tabularization` for further details). For these tests, the 'correct answer' is not
      directly specified; instead, it is generated from a set of input parameters using the set of simplified
      functions. The rationale behind this approach is that it allows for many different combinations of input
      values to be effortlessly tested. The drawback of this, however, is that the correctness of these tests
      assumes that the simplified functions have been implemented correctly - if this isn't the case, then these
      tests are not to be trusted. In saying this, these simplified functions are significantly easier to
      understand and debug than the `create_lagged_prediction_data` function they're helping to test.
      2. 'Specified Test Cases': these test that `create_lagged_prediction_data` returns an exactly specified
      output; these specified outputs are *not* 'generated' by another function. Although these 'specified'
      test cases tend to be simpler and less extensive than the 'generated' test cases, their correctness does
      not assume the correct implementation of any other function.
class_docstr_tok: ["Tests","`","create_lagged_prediction_data","`","function","defined","in","`","darts.utils.data.tabularization","`",".","There","are","broadly","two","'groups","'","of","tests","defined","in","this","module",":","1",".","'Generated","Test","Cases","'",":","these","test","that","`","create_lagged_prediction_data","`","produces","the","same","outputs","as","a","simplified","implementation","of","the","'time","intersection","'","feature","generation","method","(","see","`","darts.utils.data.tabularization","`","for","further","details",")",".","For","these","tests",",","the","'correct","answer","'","is","not","directly","specified",";","instead",",","it","is","generated","from","a","set","of","input","parameters","using","the","set","of","simplified","functions",".","The","rationale","behind","this","approach","is","that","it","allows","for","many","different","combinations","of","input","values","to","be","effortlessly","tested",".","The","drawback","of","this",",","however",",","is","that","the","correctness","of","these","tests","assumes","that","the","simplified","functions","have","been","implemented","correctly","-","if","this","is","n't","the","case",",","then","these","tests","are","not","to","be","trusted",".","In","saying","this",",","these","simplified","functions","are","significantly","easier","to","understand","and","debug","than","the","`","create_lagged_prediction_data","`","function","they","'re","helping","to","test",".","2",".","'Specified","Test","Cases","'",":","these","test","that","`","create_lagged_prediction_data","`","returns","an","exactly","specified","output",";","these","specified","outputs","are","*","not","*","'generated","'","by","another","function",".","Although","these","'specified'","test","cases","tend","to","be","simpler","and","less","extensive","than","the","'generated","'","test","cases",",","their","correctness","does","not","assume","the","correct","implementation","of","any","other","function","."]
docstr: Tests that `create_lagged_prediction_data` throws correct error
  when supplied series is too short to generate any
  features from using the specified `lags`.
docstr_tok: ["Tests","that","`","create_lagged_prediction_data","`","throws","correct","error","when","supplied","series","is","too","short","to","generate","any","features","from","using","the","specified","`","lags","`","."]
code: def test_lagged_prediction_data_series_too_short_error(self):
      """
      Tests that `create_lagged_prediction_data` throws correct error
      when supplied series is too short to generate any
      features from using the specified `lags`.
      """
      series = linear_timeseries(start=1, length=2, freq=1)
      # Check error thrown by 'moving windows' method and by 'time intersection' method:
      for use_moving_windows in (False, True):
          with pytest.raises(ValueError) as err:
              create_lagged_prediction_data(
                  target_series=series,
                  lags=[-20, -1],
                  uses_static_covariates=False,
                  use_moving_windows=use_moving_windows,
              )
          assert (
              "`target_series` must have at least "
              "`-min(lags) + max(lags) + 1` = 20 "
              "timesteps; instead, it only has 2."
          ) == str(err.value)
          with pytest.raises(ValueError) as err:
              create_lagged_prediction_data(
                  past_covariates=series,
                  lags_past_covariates=[-20, -1],
                  uses_static_covariates=False,
                  use_moving_windows=use_moving_windows,
              )
          assert (
              "`past_covariates` must have at least "
              "`-min(lags_past_covariates) + max(lags_past_covariates) + 1` = 20 "
              "timesteps; instead, it only has 2."
          ) == str(err.value)
  
imports: import warnings
  from itertools import product
  from typing import Optional, Sequence
  import numpy
  import pandas
  import pytest
  from darts import TimeSeries
  from darts import concatenate
  from darts.logging import get_logger, raise_if_not, raise_log
  from darts.utils.data.tabularization import create_lagged_prediction_data
  from darts.utils.timeseries_generation import linear_timeseries
label_desc: Use image node_id 27 for calling the TestCreateLaggedPredictionData obj's underlying member method code with example usage: obj.test_lagged_prediction_data_series_too_short_error() without return types