code: def test_given_simple_linear_data_when_estimate_conditional_anomaly_scores_then_returns_expected_result():
      X = np.random.normal(0, 1, 1000)
      N = np.random.normal(0, 1, 1000)
  
      Y = 2 * X + N
  
      causal_model = AdditiveNoiseModel(
          prediction_model=create_linear_regressor()
      )
      causal_model.fit(X, Y)
  
      anomaly_scorer = MeanDeviationScorer()
      anomaly_scorer.fit(N)
  
      assert conditional_anomaly_scores(
          X[:5], Y[:5], causal_model, MeanDeviationScorer
      ).reshape(-1) == approx(
          anomaly_scorer.score(Y[:5] - 2 * X[:5]), abs=0.1
      )
  
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 12 for calling a global function with example usage: test_given_simple_linear_data_when_estimate_conditional_anomaly_scores_then_returns_expected_result() without return types