code: def test_check_select_fit_kwargs_IgnoredArgumentWarning_when_fit_kwargs_has_sample_weight():
      """
      Test check_select_fit_kwargs issues IgnoredArgumentWarning when fit_kwargs
      has sample_weight argument.
      """
      fit_kwargs = {"sample_weight": [1, 2, 3]}
      regressor = LGBMRegressor()
  
      warn_msg = re.escape(
          (
              "The `sample_weight` argument is ignored. Use `weight_func` to pass "
              "a function that defines the individual weights for each sample "
              "based on its index."
          )
      )
      with pytest.warns(IgnoredArgumentWarning, match=warn_msg):
          check_select_fit_kwargs(
              regressor=regressor, fit_kwargs=fit_kwargs
          )
  
file_path: skforecast/skforecast/utils/tests/test_check_select_fit_kwargs.py
imports: import re
  import pytest
  import inspect
  from skforecast.exceptions import IgnoredArgumentWarning
  from skforecast.utils import check_select_fit_kwargs
  from lightgbm import LGBMRegressor
label_desc: Use image node_id 3 for calling a global function with example usage: test_check_select_fit_kwargs_IgnoredArgumentWarning_when_fit_kwargs_has_sample_weight() without return types