class_docstr: Check if test indexes are present in train data.
  
  Parameters
  ----------
  n_to_show : int , default: 5
      Number of samples with same indices in train and test to show.
  n_samples : int , default: 10_000_000
      number of samples to use for this check.
  random_state : int, default: 42
      random seed for all check internals.
docstr: Add condition - require index leakage ratio to be less or equal to threshold.
  
  Parameters
  ----------
  max_ratio : float , default: 0
      Maximum ratio of index leakage.
docstr_tok: ["Add","condition","-","require","index","leakage","ratio","to","be","less","or","equal","to","threshold",".","Parameters","--","--","--","--","--","max_ratio",":","float",",","default",":","0","Maximum","ratio","of","index","leakage","."]
code: def add_condition_ratio_less_or_equal(self, max_ratio: float = 0):
      """Add condition - require index leakage ratio to be less or equal to threshold.
  
      Parameters
      ----------
      max_ratio : float , default: 0
          Maximum ratio of index leakage.
      """
  
      def max_ratio_condition(result: float) -> ConditionResult:
          details = (
              f"Found {format_percent(result)} of index leakage"
              if result > 0
              else "No index leakage found"
          )
          category = (
              ConditionCategory.PASS
              if result <= max_ratio
              else ConditionCategory.FAIL
          )
          return ConditionResult(category, details)
  
      return self.add_condition(
          f"Ratio of leaking indices is less or equal to {format_percent(max_ratio)}",
          max_ratio_condition,
      )
  
file_path: deepchecks/deepchecks/tabular/checks/train_test_validation/index_leakage.py
imports: import pandas
  from deepchecks.core import CheckResult, ConditionResult
  from deepchecks.core.condition import ConditionCategory
  from deepchecks.tabular import Context, TrainTestCheck
  from deepchecks.utils.strings import format_percent
label_desc: Use image node_id 3 for calling the IndexTrainTestLeakage obj's underlying member method code with example usage: obj.add_condition_ratio_less_or_equal(max_ratio) and returns: self, ConditionResult