code: def test_condition_leakage_fail():
      # Arrange
      train_ds = dataset_from_dict(
          {"col1": [1, 2, 3, 4, 10, 11, np.nan]}, "col1"
      )
      val_ds = dataset_from_dict({"col1": [4, 5, 6, 7, np.nan]}, "col1")
      check = IndexTrainTestLeakage(
          n_to_show=1
      ).add_condition_ratio_less_or_equal(max_ratio=0.19)
  
      result = check.conditions_decision(check.run(train_ds, val_ds))
  
      assert_that(
          result,
          has_items(
              equal_condition_result(
                  is_pass=False,
                  details="Found 20% of index leakage",
                  name="Ratio of leaking indices is less or equal to 19%",
              )
          ),
      )
  
file_path: deepchecks/tests/tabular/checks/train_test_validation/index_train_val_leakage_test.py
imports: import numpy
  import pandas
  from hamcrest import assert_that, calling, close_to, greater_than, has_items, has_length, raises
  from deepchecks.core.errors import DatasetValidationError, DeepchecksValueError
  from deepchecks.tabular.checks.train_test_validation.index_leakage import IndexTrainTestLeakage
  from deepchecks.tabular.dataset import Dataset
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 9 for calling a global function with example usage: test_condition_leakage_fail() without return types