code: def test_given_non_minimal_DAG_when_validating_causal_minimality_then_report_violations():
      true_dag = nx.DiGraph([("X0", "Y"), ("X1", "Y")])
      true_dag.add_node("X2")
      given_dag = true_dag.copy()
      given_dag.add_edge("X2", "Y")
  
      X0 = np.random.normal(size=500)
      X1 = np.random.normal(size=500)
      X2 = np.random.normal(size=500)
      Y = 2 * X0 + 3 * X1 + np.random.normal(size=500)
      data = pd.DataFrame(data=dict(X0=X0, X1=X1, X2=X2, Y=Y))
      summary = run_validations(
          given_dag,
          data,
          methods=partial(
              validate_cm,
              independence_test=_gcm_linear,
              conditional_independence_test=_gcm_linear,
          ),
      )
  
      assert (
          summary[FalsifyConst.VALIDATE_CM][FalsifyConst.N_VIOLATIONS]
          == 1
      )
      assert (
          summary[FalsifyConst.VALIDATE_CM][FalsifyConst.N_TESTS] == 3
      )
  
imports: from functools import partial
  import networkx
  import numpy
  import pandas
  import pytest
  from flaky import flaky
  from dowhy.datasets import generate_random_graph
  from dowhy.gcm.falsify import FalsifyConst, _PermuteNodes, falsify_graph, run_validations, validate_cm, validate_lmc, validate_pd, validate_tpa
  from dowhy.gcm.independence_test.generalised_cov_measure import generalised_cov_based
  from dowhy.gcm.independence_test.kernel import kernel_based
  from dowhy.gcm.ml import create_linear_regressor
  from tests.gcm.independence_test.test_kernel import _generate_categorical_data
label_desc: Use image node_id 15 for calling a global function with example usage: test_given_non_minimal_DAG_when_validating_causal_minimality_then_report_violations() without return types