code: def test_initialize_levels_model_selection_multiseries_TypeError_when_levels_not_list_str_None(
      forecaster,
  ):
      """
      Test TypeError is raised in _initialize_levels_model_selection_multiseries when
      `levels` is not a `list`, `str` or `None`.
      """
      levels = 5
  
      err_msg = re.escape(
          (
              "`levels` must be a `list` of column names, a `str` of a column name "
              "or `None` when using a `ForecasterAutoregMultiSeries` or "
              "`ForecasterAutoregMultiSeriesCustom`. If the forecaster is of type "
              "`ForecasterAutoregMultiVariate`, this argument is ignored."
          )
      )
      with pytest.raises(TypeError, match=err_msg):
          _initialize_levels_model_selection_multiseries(
              forecaster=forecaster, series=series, levels=levels
          )
  
file_path: skforecast/skforecast/model_selection_multiseries/tests/test_initialize_levels_model_selection_multiseries.py
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.linear_model import Ridge
  from skforecast.ForecasterAutoregMultiSeries import ForecasterAutoregMultiSeries
  from skforecast.ForecasterAutoregMultiSeriesCustom import ForecasterAutoregMultiSeriesCustom
  from skforecast.ForecasterAutoregMultiVariate import ForecasterAutoregMultiVariate
  from skforecast.model_selection_multiseries.model_selection_multiseries import _initialize_levels_model_selection_multiseries
  from skforecast.exceptions import IgnoredArgumentWarning
  from .fixtures_model_selection_multiseries import series
label_desc: Use image node_id 2 for calling a global function with example usage: test_initialize_levels_model_selection_multiseries_TypeError_when_levels_not_list_str_None(forecaster) without return types