code: def test_added_impure_contribution_is_zero():
      X = [
          ["A", "A"],
          ["A", "B"],
          ["B", "A"],
          ["B", "B"],
      ]
      y = [-16.0, 2.0, 32.0, -8.0]
      sample_weight = [2.5, 20, 1.25, 5]
  
      ranked_strengths_pure_int = dict(
          measure_interactions(
              X, y, min_samples_leaf=1, sample_weight=sample_weight
          )
      )
  
      y = [
          -16.0 + 3.0 + 11.0,
          2.0 + 3.0 + 7.0,
          32.0 + 5.0 + 11.0,
          -8.0 + 5.0 + 7.0,
      ]
  
      ranked_strengths_impure = dict(
          measure_interactions(
              X, y, min_samples_leaf=1, sample_weight=sample_weight
          )
      )
      assert (
          ranked_strengths_pure_int[(0, 1)]
          == ranked_strengths_impure[(0, 1)]
      )
  
imports: import pytest
  import numpy
  from math import isclose
  from sklearn.linear_model import LinearRegression, LogisticRegression
  from sklearn.dummy import DummyClassifier
  from ..tutils import synthetic_regression, synthetic_classification, synthetic_multiclass
  from interpret.utils import measure_interactions
label_desc: Use image node_id 24 for calling a global function with example usage: test_added_impure_contribution_is_zero() without return types