code: def test_parameter_validation():
      reg = xgb.XGBRegressor(foo="bar", verbosity=1)
      X = np.random.randn(10, 10)
      y = np.random.randn(10)
      with pytest.warns(Warning, match="foo"):
          reg.fit(X, y)
  
      reg = xgb.XGBRegressor(
          n_estimators=2, missing=3, importance_type="gain", verbosity=1
      )
      X = np.random.randn(10, 10)
      y = np.random.randn(10)
  
      with warnings.catch_warnings():
          reg.fit(X, y)
  
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 38 for calling a global function with example usage: test_parameter_validation() without return types