code: def test_update():
      """This is to test the update function within benchmark/framework"""
      sort_order = "positive"
  
      def score_function(true, pred):
          return np.mean(pred)
  
      perturbation = "keep"
      scores = {"name": "test", "metrics": list(), "values": dict()}
  
      shap.benchmark.update(
          model,
          X,
          y,
          explainer,
          masker,
          sort_order,
          score_function,
          perturbation,
          scores,
      )
  
      metric = perturbation + " " + sort_order
  
      assert scores["metrics"][0] == metric
      assert len(scores["values"][metric]) == 3
  
imports: import numpy
  import shap
label_desc: Use image node_id 2 for calling a global function with example usage: test_update() and returns: np