code: def test_serialization_independent_masker_numpy():
      """Test the serialization of an Independent masker based on a numpy array."""
  
      X, _ = shap.datasets.california(n_points=500)
      X = X.values
  
      # initialize independent masker
      original_independent_masker = shap.maskers.Independent(X)
  
      with tempfile.TemporaryFile() as temp_serialization_file:
          # serialize independent masker
          original_independent_masker.save(temp_serialization_file)
  
          temp_serialization_file.seek(0)
  
          # deserialize masker
          new_independent_masker = shap.maskers.Masker.load(
              temp_serialization_file
          )
  
      mask = np.ones(X.shape[1]).astype(int)
      mask[0] = 0
      mask[4] = 0
  
      # comparing masked values
      assert np.array_equal(
          original_independent_masker(mask, X[0])[0],
          new_independent_masker(mask, X[0])[0],
      )
  
imports: import tempfile
  import numpy
  import shap
label_desc: Use image node_id 2 for calling a global function with example usage: test_serialization_independent_masker_numpy() without return types