code: def test_interactions_additivity(
      explainer_type, model, masker, data, **kwargs
  ):
      """Test explainer and masker for additivity on a single output prediction problem."""
      explainer = explainer_type(model, masker, **kwargs)
      shap_values = explainer(data, interactions=True)
  
      assert np.max(
          np.abs(
              shap_values.base_values
              + shap_values.values.sum((1, 2))
              - model(data)
          )
          < 1e6
      )
  
file_path: shap/tests/explainers/common.py
imports: import tempfile
  import numpy
  import pytest
  import shap
label_desc: Use image node_id 3 for calling a global function with example usage: test_interactions_additivity(explainer_type, model, masker, data) without return types