code: def test_fit_model_coef_when_using_weight_func():
      """
      Check the value of the regressor coefs when using a `weight_func`.
      """
      forecaster = ForecasterAutoreg(
          regressor=LinearRegression(),
          lags=5,
          weight_func=custom_weights,
      )
      forecaster.fit(y=y)
      results = forecaster.regressor.coef_
      expected = np.array(
          [0.01211677, -0.20981367, 0.04214442, -0.0369663, -0.18796105]
      )
  
      np.testing.assert_almost_equal(results, expected)
  
file_path: skforecast/skforecast/ForecasterAutoreg/tests/test_fit.py
imports: import numpy
  import pandas
  from skforecast.ForecasterAutoreg import ForecasterAutoreg
  from sklearn.linear_model import LinearRegression
  from .fixtures_ForecasterAutoreg import y
label_desc: Use image node_id 8 for calling a global function with example usage: test_fit_model_coef_when_using_weight_func() without return types