code: def test_exact_second_order(random_seed):
      """This tests that the Perumtation explain gives exact answers for second order functions."""
      rs = np.random.RandomState(random_seed)
      data = rs.randint(0, 2, size=(100, 5))
  
      def model(data):
          return (
              data[:, 0] * data[:, 2]
              + data[:, 1]
              + data[:, 2]
              + data[:, 2] * data[:, 3]
          )
  
      right_answer = np.zeros(data.shape)
      right_answer[:, 0] += (data[:, 0] * data[:, 2]) / 2
      right_answer[:, 2] += (data[:, 0] * data[:, 2]) / 2
      right_answer[:, 1] += data[:, 1]
      right_answer[:, 2] += data[:, 2]
      right_answer[:, 2] += (data[:, 2] * data[:, 3]) / 2
      right_answer[:, 3] += (data[:, 2] * data[:, 3]) / 2
      shap_values = shap.explainers.PermutationExplainer(
          model, np.zeros((1, 5))
      )(data)
  
      assert np.allclose(right_answer, shap_values.values)
  
file_path: shap/tests/explainers/test_permutation.py
imports: import pickle
  import numpy
  import shap
  from .None import common
label_desc: Use image node_id 1 for calling a global function with example usage: test_exact_second_order(random_seed) and returns: unknown