code: def test_given_non_linear_data_and_correct_dag_when_refute_invertible_model_then_not_reject_model():
      data = _generate_simple_non_linear_data()
  
      causal_model = InvertibleStructuralCausalModel(
          nx.DiGraph([("X", "Y"), ("Y", "Z")])
      )  # X->Y->Z
      auto.assign_causal_mechanisms(
          causal_model, data, auto.AssignmentQuality.GOOD
      )
  
      fit(causal_model, data)
  
      assert (
          refute_invertible_model(
              causal_model,
              data,
              independence_test=lambda x, y: kernel_based(
                  x, y, use_bootstrap=False
              ),
          )
          == RejectionResult.NOT_REJECTED
      )
      assert (
          refute_invertible_model(
              causal_model,
              data,
              independence_test=lambda x, y: kernel_based(
                  x, y, use_bootstrap=False
              ),
              fdr_control_method="fdr_bh",
          )
          == RejectionResult.NOT_REJECTED
      )
  
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 8 for calling a global function with example usage: test_given_non_linear_data_and_correct_dag_when_refute_invertible_model_then_not_reject_model() without return types