class_docstr: Base functionality for some train-test performance checks.
docstr: Add condition - test performance is not degraded by more than given percentage in train.
  
  Parameters
  ----------
  threshold : float , default: 0.1
      maximum degradation ratio allowed (value between 0 and 1)
docstr_tok: ["Add","condition","-","test","performance","is","not","degraded","by","more","than","given","percentage","in","train",".","Parameters","--","--","--","--","--","threshold",":","float",",","default",":","0.1","maximum","degradation","ratio","allowed","(","value","between","0","and","1",")"]
code: def add_condition_train_test_relative_degradation_less_than(
      self: Self, threshold: float = 0.1
  ) -> Self:
      """Add condition - test performance is not degraded by more than given percentage in train.
  
      Parameters
      ----------
      threshold : float , default: 0.1
          maximum degradation ratio allowed (value between 0 and 1)
      """
      name = f"Train-Test scores relative degradation is less than {threshold}"
      condition = (
          get_condition_train_test_relative_degradation_less_than(
              threshold=threshold
          )
      )
      return self.add_condition(name, condition)
  
file_path: deepchecks/deepchecks/utils/abstracts/train_test_performace.py
imports: import abc
  import typing
  import pandas
  import plotly.express
  from typing_extensions import Self
  from deepchecks.core.check_utils.class_performance_utils import get_condition_class_performance_imbalance_ratio_less_than, get_condition_test_performance_greater_than, get_condition_train_test_relative_degradation_less_than
  from deepchecks.utils.plot import DEFAULT_DATASET_NAMES, colors
  from deepchecks.utils.strings import format_percent
label_desc: Use image node_id 3 for calling the TrainTestPerformanceAbstract obj's underlying member method code with example usage: obj.add_condition_train_test_relative_degradation_less_than(threshold) and returns: self