code: def test_kwargs_grid_search():
      from sklearn import datasets
      from sklearn.model_selection import GridSearchCV
  
      params = {"tree_method": "hist"}
      clf = xgb.XGBClassifier(n_estimators=3, **params)
      assert clf.get_params()["tree_method"] == "hist"
      # 'eta' is not a default argument of XGBClassifier
      # Check we can still do grid search over this parameter
      search_params = {"eta": [0, 0.2, 0.4]}
      grid_cv = GridSearchCV(clf, search_params, cv=5)
      iris = datasets.load_iris()
      grid_cv.fit(iris.data, iris.target)
  
      # Expect unique results for each parameter value
      # This confirms sklearn is able to successfully update the parameter
      means = grid_cv.cv_results_["mean_test_score"]
      assert len(means) == len(set(means))
  
imports: import json
  import os
  import pickle
  import random
  import tempfile
  import warnings
  from typing import Callable, Optional
  import numpy
  import pytest
  from sklearn.utils.estimator_checks import parametrize_with_checks
  import xgboost
  from xgboost import testing
  from xgboost.testing.ranking import run_ranking_categorical, run_ranking_qid_df
  from xgboost.testing.shared import get_feature_weights, validate_data_initialization
  from xgboost.testing.updater import get_basescore
label_desc: Use image node_id 30 for calling a global function with example usage: test_kwargs_grid_search() without return types