code: def get_benchmark(model, attributions, X, y, masker, metrics):
      # convert dataframes
      if isinstance(X, (pd.Series, pd.DataFrame)):
          X = X.values
      if isinstance(masker, (pd.Series, pd.DataFrame)):
          masker = masker.values
  
      # record scores per metric
      scores = {"metrics": list(), "values": dict()}
      for sort_order, perturbation_method in list(
          it.product(metrics["sort_order"], metrics["perturbation"])
      ):
          update(
              model,
              attributions,
              X,
              y,
              masker,
              sort_order,
              perturbation_method,
              scores,
          )
  
      return scores
  
file_path: shap/shap/benchmark/framework.py
imports: import itertools
  import matplotlib.pyplot
  import numpy
  import pandas
  from .None import perturbation
label_desc: Use image node_id 2 for calling a global function with example usage: get_benchmark(model, attributions, X, y, masker, metrics) and returns: scores