code: def test_model_construction(self, config):
      model, mode = config
      # TESTING SINGLE INT
      # testing lags
      model_instance = model(lags=5, multi_models=mode)
      assert model_instance.lags.get("target") == [-5, -4, -3, -2, -1]
      # testing lags_past_covariates
      model_instance = model(
          lags=None, lags_past_covariates=3, multi_models=mode
      )
      assert model_instance.lags.get("past") == [-3, -2, -1]
      # lags_future covariates does not support SINGLE INT
  
      # TESTING TUPLE of int, only supported by lags_future_covariates
      model_instance = model(
          lags=None, lags_future_covariates=(3, 5), multi_models=mode
      )
      assert model_instance.lags.get("future") == [
          -3,
          -2,
          -1,
          0,
          1,
          2,
          3,
          4,
      ]
  
      # TESTING LIST of int
      # lags
      values = [-5, -3, -1]
      model_instance = model(lags=values, multi_models=mode)
      assert model_instance.lags.get("target") == values
      # testing lags_past_covariates
      model_instance = model(
          lags_past_covariates=values, multi_models=mode
      )
      assert model_instance.lags.get("past") == values
      # testing lags_future_covariates
      values = [-5, -1, 5]
      model_instance = model(
          lags_future_covariates=values, multi_models=mode
      )
      assert model_instance.lags.get("future") == values
  
      # TESTING DICT, lags are specified component-wise
      # model.lags contains the extreme across the components
      values = {"comp0": [-4, -2], "comp1": [-5, -3]}
      model_instance = model(lags=values, multi_models=mode)
      assert model_instance.lags.get("target") == [-5, -2]
      assert model_instance.component_lags.get("target") == values
      # testing lags_past_covariates
      model_instance = model(
          lags_past_covariates=values, multi_models=mode
      )
      assert model_instance.lags.get("past") == [-5, -2]
      assert model_instance.component_lags.get("past") == values
      # testing lags_future_covariates
      values = {"comp0": [-4, 2], "comp1": [-5, 3]}
      model_instance = model(
          lags_future_covariates=values, multi_models=mode
      )
      assert model_instance.lags.get("future") == [-5, 3]
      assert model_instance.component_lags.get("future") == values
  
      with pytest.raises(ValueError):
          model(multi_models=mode)
      with pytest.raises(ValueError):
          model(lags=0, multi_models=mode)
      with pytest.raises(ValueError):
          model(lags=[-1, 0], multi_models=mode)
      with pytest.raises(ValueError):
          model(lags=[3, 5], multi_models=mode)
      with pytest.raises(ValueError):
          model(lags=[-3, -5.0], multi_models=mode)
      with pytest.raises(ValueError):
          model(lags=-5, multi_models=mode)
      with pytest.raises(ValueError):
          model(lags=3.6, multi_models=mode)
      with pytest.raises(ValueError):
          model(
              lags=None, lags_past_covariates=False, multi_models=mode
          )
      with pytest.raises(ValueError):
          model(lags=None, multi_models=mode)
      with pytest.raises(ValueError):
          model(lags=5, lags_future_covariates=True, multi_models=mode)
      with pytest.raises(ValueError):
          model(
              lags=5, lags_future_covariates=(1, -3), multi_models=mode
          )
      with pytest.raises(ValueError):
          model(
              lags=5,
              lags_future_covariates=(1, 2, 3),
              multi_models=mode,
          )
      with pytest.raises(ValueError):
          model(
              lags=5,
              lags_future_covariates=(1, True),
              multi_models=mode,
          )
      with pytest.raises(ValueError):
          model(
              lags=5, lags_future_covariates=(1, 1.0), multi_models=mode
          )
      with pytest.raises(ValueError):
          model(lags=5, lags_future_covariates={}, multi_models=mode)
      with pytest.raises(ValueError):
          model(lags=None, lags_future_covariates={}, multi_models=mode)
  
imports: import copy
  import functools
  import itertools
  import math
  from unittest.mock import patch
  import numpy
  import pandas
  import pytest
  from sklearn.ensemble import HistGradientBoostingRegressor, RandomForestRegressor
  from sklearn.linear_model import LinearRegression
  import darts
  from darts import TimeSeries
  from darts.dataprocessing.encoders import FutureCyclicEncoder, PastDatetimeAttributeEncoder
  from darts.logging import get_logger
  from darts.metrics import mae, rmse
  from darts.models import CatBoostModel, LightGBMModel, LinearRegressionModel, NotImportedModule, RandomForest, RegressionModel, XGBModel
  from darts.utils import timeseries_generation
  from darts.utils.multioutput import MultiOutputRegressor
label_desc: Use image node_id 2 for calling the TestRegressionModels obj's underlying member method code with example usage: obj.test_model_construction(config) without return types