code: def test_init_TypeError_when_weight_func_argument_is_not_Callable():
      """
      Test TypeError is raised when weight_func is not a Callable or a dict of Callables.
      """
      weight_func = "---"
      err_msg = re.escape(
          (
              f"Argument `weight_func` must be a Callable or a dict of "
              f"Callables. Got {type(weight_func)}."
          )
      )
      with pytest.raises(TypeError, match=err_msg):
          ForecasterAutoregMultiSeriesCustom(
              regressor=LinearRegression(),
              fun_predictors=create_predictors,
              window_size=5,
              weight_func=weight_func,
          )
  
file_path: skforecast/skforecast/ForecasterAutoregMultiSeriesCustom/tests/test_init.py
imports: import re
  import pytest
  from skforecast.ForecasterAutoregMultiSeriesCustom import ForecasterAutoregMultiSeriesCustom
  from sklearn.linear_model import LinearRegression
label_desc: Use image node_id 4 for calling a global function with example usage: test_init_TypeError_when_weight_func_argument_is_not_Callable() without return types