code: def get_shap_values(
      explainer,
      dataset,
      train_or_test="test",
      api_type="raw_shap_values",
  ):
      X_test, X_train, _, _ = dataset
      if train_or_test == "test":
          explained_dataset = X_test
      elif train_or_test == "train":
          explained_dataset = X_train
  
      if api_type == "raw_shap_values":
          shap_values = explainer.shap_values(explained_dataset)
      elif api_type == "explanation_object":
          shap_values = explainer(explained_dataset)
  
      return shap_values, explained_dataset
  
file_path: cuml/python/cuml/tests/explainer/test_shap_plotting.py
imports: import pytest
  from cuml import KernelExplainer
  from cuml import LinearRegression
label_desc: Use image node_id 1 for calling a global function with example usage: get_shap_values(explainer, dataset, train_or_test, api_type) and returns: shap_values,  explained_dataset