code: def test_given_chain_when_refuting_causal_structure_then_not_rejected():
      # chain: X->Z->Y
      chain_dag = nx.DiGraph([("X", "Z"), ("Z", "Y")])
      X = np.random.normal(size=500)
      Z = 2 * X + np.random.normal(size=500)
      Y = 3 * Z + np.random.normal(size=500)
      data = pd.DataFrame(data=dict(X=X, Y=Y, Z=Z))
      rejection_result, rejection_summary = refute_causal_structure(
          chain_dag, data
      )
  
      assert rejection_result == RejectionResult.NOT_REJECTED
      assert rejection_summary["X"]["local_markov_test"] == dict()
      assert rejection_summary["X"]["edge_dependence_test"] == dict()
      assert rejection_summary["Z"]["local_markov_test"] == dict()
      assert (
          rejection_summary["Z"]["edge_dependence_test"]["X"]["success"]
          == True
      )
      assert (
          rejection_summary["Y"]["local_markov_test"]["success"] == True
      )
      assert (
          rejection_summary["Y"]["edge_dependence_test"]["Z"]["success"]
          == True
      )
  
file_path: dowhy/tests/gcm/test_validation.py
imports: import networkx
  import numpy
  import pandas
  from flaky import flaky
  from dowhy.gcm import InvertibleStructuralCausalModel, RejectionResult, auto, fit, kernel_based, refute_causal_structure, refute_invertible_model
label_desc: Use image node_id 3 for calling a global function with example usage: test_given_chain_when_refuting_causal_structure_then_not_rejected() without return types