code: def test_given_data_with_change_in_mechanism_when_estimate_distribution_change_score_then_returns_expected_result():
      (
          causal_model,
          original_observations,
      ) = _create_scm_for_distribution_change()
  
      X0 = np.random.uniform(-1, 1, 1000)
      X1 = 2 * X0 + np.random.normal(0, 0.1, 1000)
      # Here, changing the mechanism.
      X2 = 2 * 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}
      )
  
      assert (
          max(
              estimate_distribution_change_scores(
                  causal_model,
                  original_observations,
                  outlier_observations,
              ).items(),
              key=operator.itemgetter(1),
          )[0]
          == "X2"
      )
  
imports: import operator
  import networkx
  import numpy
  import pandas
  from flaky import flaky
  from pytest import approx
  from dowhy.gcm import AdditiveNoiseModel, EmpiricalDistribution, InverseDensityScorer, ITAnomalyScorer, MeanDeviationScorer, MedianCDFQuantileScorer, MedianDeviationScorer, ProbabilisticCausalModel, RescaledMedianCDFQuantileScorer, anomaly_scores, auto, fit
  from dowhy.gcm.anomaly import conditional_anomaly_scores
  from dowhy.gcm.constant import EPS
  from dowhy.gcm.distribution_change import estimate_distribution_change_scores
  from dowhy.gcm.ml import create_linear_regressor
label_desc: Use image node_id 6 for calling a global function with example usage: test_given_data_with_change_in_mechanism_when_estimate_distribution_change_score_then_returns_expected_result() without return types