code: def test_given_data_of_only_a_subset_of_nodes_when_falsify_and_set_allow_data_subset_to_false_then_raise_error():
      with pytest.raises(ValueError):
          falsify_graph(
              nx.DiGraph([("X", "Y"), ("Y", "Z")]),
              pd.DataFrame(
                  {"X": np.random.random(10), "Y": np.random.random(10)}
              ),
              allow_data_subset=False,
          )
  
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 17 for calling a global function with example usage: test_given_data_of_only_a_subset_of_nodes_when_falsify_and_set_allow_data_subset_to_false_then_raise_error() without return types