code: def test_given_specific_random_seed_when_estimate_shapley_values_permutation_based_then_returns_deterministic_result(
      preserve_random_generator_state,
  ):
      X, coefficients = _generate_data(15)
  
      def model(x):
          return np.sum(coefficients * x, axis=1)
  
      shapley_config = ShapleyConfig(
          approximation_method=ShapleyApproximationMethods.PERMUTATION
      )
      assert estimate_shapley_values(
          lambda subset: _set_function_for_aggregated_feature_attribution(
              subset, X, model
          ),
          X.shape[1],
          shapley_config,
      ) != approx(
          estimate_shapley_values(
              lambda subset: _set_function_for_aggregated_feature_attribution(
                  subset, X, model
              ),
              X.shape[1],
              shapley_config,
          ),
          abs=0,
      )
  
      np.random.seed(0)
      shapley_values_1 = estimate_shapley_values(
          lambda subset: _set_function_for_aggregated_feature_attribution(
              subset, X, model
          ),
          X.shape[1],
          shapley_config,
      )
      np.random.seed(0)
      shapley_values_2 = estimate_shapley_values(
          lambda subset: _set_function_for_aggregated_feature_attribution(
              subset, X, model
          ),
          X.shape[1],
          shapley_config,
      )
  
      assert shapley_values_1 == approx(shapley_values_2, abs=0)
  
imports: import random
  import numpy
  import pytest
  from flaky import flaky
  from pytest import approx
  from dowhy.gcm.shapley import ShapleyApproximationMethods, ShapleyConfig, estimate_shapley_values
  from dowhy.gcm.stats import permute_features
  from dowhy.gcm.util.general import means_difference
label_desc: Use image node_id 10 for calling a global function with example usage: test_given_specific_random_seed_when_estimate_shapley_values_permutation_based_then_returns_deterministic_result(preserve_random_generator_state) and returns: np