code: def test_check_create_lags_exception_when_n_splits_less_than_0():
      """
      Check exception is raised when n_splits in _create_lags is less than 0.
      """
      forecaster = ForecasterAutoregMultiVariate(
          LinearRegression(), level="l1", lags=8, steps=3
      )
      y = pd.Series(np.arange(10))
  
      err_msg = re.escape(
          f"The maximum lag ({forecaster.max_lag}) must be less than the length "
          f"of the series minus the number of steps ({len(y)-(forecaster.steps-1)})."
      )
      with pytest.raises(ValueError, match=err_msg):
          forecaster._create_lags(
              y=y, lags=np.array([1, 2, 3, 4, 5, 6, 7, 8])
          )
  
file_path: skforecast/skforecast/ForecasterAutoregMultiVariate/tests/test_create_lags.py
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregMultiVariate import ForecasterAutoregMultiVariate
  from sklearn.linear_model import LinearRegression
label_desc: Use image node_id 1 for calling a global function with example usage: test_check_create_lags_exception_when_n_splits_less_than_0() without return types