code: def test_given_misspecified_graph_when_estimating_parent_relevance_with_observed_data_then_returns_correct_result():
      causal_model_without = StructuralCausalModel(
          nx.DiGraph([("X0", "X2"), ("X1", "X2")])
      )
      causal_model_with = StructuralCausalModel(
          nx.DiGraph([("X0", "X1"), ("X0", "X2"), ("X1", "X2")])
      )
  
      X0 = np.random.normal(0, 1, 1000)
      X1 = X0 + np.random.normal(0, 1, 1000)
  
      training_data = pd.DataFrame({"X0": X0, "X1": X1, "X2": X0 + X1})
      auto.assign_causal_mechanisms(
          causal_model_without,
          training_data,
          auto.AssignmentQuality.GOOD,
      )
      auto.assign_causal_mechanisms(
          causal_model_with, training_data, auto.AssignmentQuality.GOOD
      )
  
      fit(causal_model_without, training_data)
      fit(causal_model_with, training_data)
  
      feature_relevance_missing_edge, _ = parent_relevance(
          causal_model_without, "X2", training_data
      )
      feature_relevance_with_edge, _ = parent_relevance(
          causal_model_with, "X2"
      )
  
      assert feature_relevance_missing_edge[("X0", "X2")] == approx(
          feature_relevance_with_edge[("X0", "X2")], abs=0.15
      )
      assert feature_relevance_missing_edge[("X1", "X2")] == approx(
          feature_relevance_with_edge[("X1", "X2")], abs=0.15
      )
  
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 7 for calling a global function with example usage: test_given_misspecified_graph_when_estimating_parent_relevance_with_observed_data_then_returns_correct_result() without return types