code: def local_accuracy(
      X_train,
      y_train,
      X_test,
      y_test,
      attr_test,
      model_generator,
      metric,
      trained_model,
  ):
      """The how well do the features plus a constant base rate sum up to the model output."""
  
      X_train, X_test = to_array(X_train, X_test)
  
      # how many features to mask
      assert X_train.shape[1] == X_test.shape[1]
  
      # keep nkeep top features and re-train the model for each test explanation
      yp_test = trained_model.predict(X_test)
  
      return metric(yp_test, strip_list(attr_test).sum(1))
  
file_path: shap/shap/benchmark/measures.py
imports: import warnings
  import numpy
  import pandas
  import sklearn.utils
  from tqdm.auto import tqdm
label_desc: Use image node_id 11 for calling a global function with example usage: local_accuracy(X_train, y_train, X_test, y_test, attr_test, model_generator, metric, trained_model) and returns: metric