code: def basic_xgboost_scenario(
      max_samples=None, dataset=shap.datasets.adult
  ):
      """Create a basic XGBoost model on a data set."""
      xgboost = pytest.importorskip("xgboost")
  
      # get a dataset on income prediction
      X, y = dataset()
      if max_samples is not None:
          X = X.iloc[:max_samples]
          y = y[:max_samples]
      X = X.values
  
      # train an XGBoost model (but any other model type would also work)
      # Specify some hyperparameters for consitency between xgboost v1.X and v2.X
      model = xgboost.XGBClassifier(tree_method="exact", base_score=0.5)
      model.fit(X, y)
  
      return model, X
  
file_path: shap/tests/explainers/common.py
imports: import tempfile
  import numpy
  import pytest
  import shap
label_desc: Use image node_id 1 for calling a global function with example usage: basic_xgboost_scenario(max_samples, dataset) and returns: model,  X