code: def test_output_initialize_weights_source_code_weight_func_when_weight_func_dict():
      """
      Test source_code_weight_func output of initialize_weights when
      weight_func is a dict.
      """
  
      def test_weight_func():  # pragma: no cover
          """
          test
          """
          pass
  
      def test_weight_func_2():  # pragma: no cover
          """
          test2
          """
          pass
  
      weight_func = {
          "series_1": test_weight_func,
          "series_2": test_weight_func_2,
      }
  
      (
          weight_func,
          source_code_weight_func,
          series_weights,
      ) = initialize_weights(
          forecaster_name="ForecasterAutoregMultiSeriesCustom",
          regressor=LinearRegression(),
          weight_func=weight_func,
          series_weights=None,
      )
  
      assert source_code_weight_func["series_1"] == inspect.getsource(
          test_weight_func
      )
      assert source_code_weight_func["series_2"] == inspect.getsource(
          test_weight_func_2
      )
  
file_path: skforecast/skforecast/utils/tests/test_initialize_weights.py
imports: import re
  import pytest
  import numpy
  import pandas
  import inspect
  from skforecast.exceptions import IgnoredArgumentWarning
  from skforecast.utils.utils import initialize_weights
  from sklearn.linear_model import LinearRegression
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.neighbors import KNeighborsRegressor
label_desc: Use image node_id 9 for calling a global function with example usage: test_output_initialize_weights_source_code_weight_func_when_weight_func_dict() without return types