code: def test_save_forecaster_save_custom_functions(weight_func):
      """
      Test if custom functions are saved correctly.
      """
      forecaster = ForecasterAutoregMultiSeriesCustom(
          regressor=LinearRegression(),
          fun_predictors=create_predictors,
          window_size=3,
          weight_func=weight_func,
      )
      save_forecaster(
          forecaster=forecaster,
          file_name="forecaster.joblib",
          save_custom_functions=True,
      )
      os.remove("forecaster.joblib")
  
      fun_predictors_file = forecaster.fun_predictors.__name__ + ".py"
      assert os.path.exists(fun_predictors_file)
      with open(fun_predictors_file, "r") as file:
          assert (
              inspect.getsource(forecaster.fun_predictors)
              == file.read()
          )
      os.remove(fun_predictors_file)
  
      weight_functions = (
          weight_func.values()
          if isinstance(weight_func, dict)
          else [weight_func]
      )
      for weight_func in weight_functions:
          weight_func_file = weight_func.__name__ + ".py"
          assert os.path.exists(weight_func_file)
          with open(weight_func_file, "r") as file:
              assert inspect.getsource(weight_func) == file.read()
          os.remove(weight_func_file)
  
imports: import os
  import re
  import joblib
  import pytest
  import inspect
  import warnings
  import numpy
  import pandas
  import skforecast
  from skforecast.ForecasterAutoreg import ForecasterAutoreg
  from skforecast.ForecasterAutoregMultiSeriesCustom import ForecasterAutoregMultiSeriesCustom
  from skforecast.utils import save_forecaster
  from skforecast.utils import load_forecaster
  from skforecast.exceptions import SkforecastVersionWarning
  from sklearn.linear_model import LinearRegression
label_desc: Use image node_id 6 for calling a global function with example usage: test_save_forecaster_save_custom_functions(weight_func) without return types