code: def test_TypeError_initialize_lags_when_lags_list_or_numpy_array_with_values_not_int():
      """
      Test TypeError is raised when lags is list or numpy array and element(s) are not int.
      """
      lags_list = [1, 1.5, [1, 2], range(5)]
      lags_np_array = np.array([1.2, 1.5])
      err_msg = re.escape("All values in `lags` must be int.")
  
      for lags in [lags_list, lags_np_array]:
          with pytest.raises(TypeError, match=err_msg):
              initialize_lags(
                  forecaster_name="ForecasterAutoreg", lags=lags
              )
  
file_path: skforecast/skforecast/utils/tests/test_initialize_lags.py
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.utils import initialize_lags
label_desc: Use image node_id 2 for calling a global function with example usage: test_TypeError_initialize_lags_when_lags_list_or_numpy_array_with_values_not_int() without return types