code: def test_when_using_parent_relevance_with_continous_data_then_returns_correct_results():
      causal_model = StructuralCausalModel(
          nx.DiGraph([("X1", "X2"), ("X0", "X2")])
      )
      causal_model.set_causal_mechanism(
          "X1", ScipyDistribution(stats.norm, loc=0, scale=1)
      )
      causal_model.set_causal_mechanism(
          "X0", ScipyDistribution(stats.norm, loc=0, scale=1)
      )
      causal_model.set_causal_mechanism(
          "X2",
          AdditiveNoiseModel(
              prediction_model=create_linear_regressor()
          ),
      )
  
      X0 = np.random.normal(0, 1, 1000)
      X1 = np.random.normal(0, 1, 1000)
      training_data = pd.DataFrame(
          {"X0": X0, "X1": X1, "X2": 3 * X0 + X1}
      )
  
      fit(causal_model, training_data)
      relevance, noise = parent_relevance(causal_model, "X2")
  
      # Contributions should add up to Var(X2)
      assert relevance[("X0", "X2")] + relevance[
          ("X1", "X2")
      ] + noise == approx(
          np.var(training_data["X2"].to_numpy()), abs=1.5
      )
      assert relevance[("X0", "X2")] == approx(9, abs=1)
      assert relevance[("X1", "X2")] == approx(1, abs=0.3)
      assert noise == approx(0, abs=0.5)
  
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 1 for calling a global function with example usage: test_when_using_parent_relevance_with_continous_data_then_returns_correct_results() without return types