code: def test_given_non_linear_data_when_using_distribution_change_with_mean_difference_then_returns_expected_results():
      X0 = np.random.uniform(-1, 1, 1000)
      X1 = 2 * X0 + np.random.normal(0, 0.1, 1000)
      X2 = np.exp(0.5 * X0) + np.random.normal(0, 0.1, 1000)
      X3 = 0.5 * X2 + np.random.normal(0, 0.1, 1000)
      original_observations = pd.DataFrame(
          {"X0": X0, "X1": X1, "X2": X2, "X3": X3}
      )
  
      X0 = np.random.uniform(-1, 1, 1000)
      X1 = 2 * X0 + np.random.normal(0, 0.1, 1000)
      X2 = 4 + np.exp(0.5 * X0) + np.random.normal(0, 0.1, 1000)
      X3 = 0.5 * X2 + np.random.normal(0, 0.1, 1000)
      outlier_observations = pd.DataFrame(
          {"X0": X0, "X1": X1, "X2": X2, "X3": X3}
      )
  
      causal_model = ProbabilisticCausalModel(
          nx.DiGraph([("X0", "X1"), ("X0", "X2"), ("X2", "X3")])
      )
  
      attributions = distribution_change(
          causal_model,
          original_observations,
          outlier_observations,
          "X3",
          difference_estimation_func=lambda x, y: np.mean(y)
          - np.mean(x),
          auto_assignment_quality=AssignmentQuality.GOOD,
      )
  
      assert attributions["X0"] == approx(0, abs=0.05)
      assert attributions["X2"] == approx(2, abs=0.05)
      assert attributions["X3"] == approx(0, abs=0.05)
      assert "X1" not in attributions
  
imports: import networkx
  import numpy
  import pandas
  from flaky import flaky
  from pytest import approx
  from dowhy.gcm import AdditiveNoiseModel, EmpiricalDistribution, ProbabilisticCausalModel, distribution_change, distribution_change_of_graphs, fit
  from dowhy.gcm.auto import AssignmentQuality
  from dowhy.gcm.distribution_change import mechanism_change_test
  from dowhy.gcm.ml import create_linear_regressor
  from dowhy.gcm.shapley import ShapleyConfig
label_desc: Use image node_id 6 for calling a global function with example usage: test_given_non_linear_data_when_using_distribution_change_with_mean_difference_then_returns_expected_results() without return types