code: def test_when_given_linear_data_when_estimate_feature_relevance_per_sample_with_mean_diff_then_returns_expected_values():
      num_vars = 15
      X = np.random.normal(0, 1, (1000, num_vars))
      coefficients = np.random.choice(20, num_vars) - 10
  
      def model(x) -> np.ndarray:
          return np.sum(coefficients * x, axis=1)
  
      shapley_values = feature_relevance_sample(
          model,
          feature_samples=X,
          baseline_samples=X[:20],
          subset_scoring_func=means_difference,
      )
  
      for i in range(20):
          assert coefficients * (
              X[i, :] - np.mean(X, axis=0)
          ) == approx(shapley_values[i], abs=0.001)
  
file_path: dowhy/tests/gcm/test_feature_relevance.py
imports: import networkx
  import numpy
  import pandas
  from flaky import flaky
  from pytest import approx
  from scipy import stats
  from dowhy.gcm import AdditiveNoiseModel, ClassifierFCM, ScipyDistribution, StructuralCausalModel, auto, confidence_intervals, fit
  from dowhy.gcm.feature_relevance import feature_relevance_distribution, feature_relevance_sample, parent_relevance
  from dowhy.gcm.ml import create_linear_regressor, create_logistic_regression_classifier
  from dowhy.gcm.shapley import ShapleyApproximationMethods, ShapleyConfig
  from dowhy.gcm.uncertainty import estimate_entropy_of_probabilities
  from dowhy.gcm.util.general import means_difference
label_desc: Use image node_id 3 for calling a global function with example usage: test_when_given_linear_data_when_estimate_feature_relevance_per_sample_with_mean_diff_then_returns_expected_values() and returns: np