class_docstr: Check for overfit caused by using too many iterations in a gradient boosted model.
  
  The check runs a pre-defined number of steps, and in each step it limits the boosting model to use up to X
  estimators (number of estimators is monotonic increasing). It plots the given score calculated for each step for
  both the train dataset and the test dataset.
  
  Parameters
  ----------
  scorer : Union[Callable, str] , default: None
      Scorer used to verify the model, either function or sklearn scorer name.
  scorer_name : str , default: None
      Name to be displayed in the plot on y-axis. must be used together with 'scorer'
  num_steps : int , default: 20
      Number of splits of the model iterations to check.
  n_samples : int , default: 1_000_000
      number of samples to use for this check.
  random_state : int, default: 42
      random seed for all check internals.
docstr: Add condition.
  
  Percent of decline between the maximal score achieved in any boosting iteration and the score achieved in the
  last iteration ("regular" model score) is not above given threshold.
  
  Parameters
  ----------
  threshold : float , default: 0.05
      Maximum percentage decline allowed (value 0 and above)
docstr_tok: ["Add","condition",".","Percent","of","decline","between","the","maximal","score","achieved","in","any","boosting","iteration","and","the","score","achieved","in","the","last","iteration","(","``","regular","''","model","score",")","is","not","above","given","threshold",".","Parameters","--","--","--","--","--","threshold",":","float",",","default",":","0.05","Maximum","percentage","decline","allowed","(","value","0","and","above",")"]
code: def add_condition_test_score_percent_decline_less_than(
      self, threshold: float = 0.05
  ):
      """Add condition.
  
      Percent of decline between the maximal score achieved in any boosting iteration and the score achieved in the
      last iteration ("regular" model score) is not above given threshold.
  
      Parameters
      ----------
      threshold : float , default: 0.05
          Maximum percentage decline allowed (value 0 and above)
      """
  
      def condition(result: dict):
          max_score = max(result["test"])
          last_score = result["test"][-1]
          pct_diff = (max_score - last_score) / abs(max_score)
          details = (
              f"Found score decline of {format_percent(-pct_diff)}"
          )
          category = (
              ConditionCategory.PASS
              if pct_diff < threshold
              else ConditionCategory.FAIL
          )
          return ConditionResult(category, details)
  
      name = f"Test score over iterations is less than {format_percent(threshold)} from the best score"
      return self.add_condition(name, condition)
  
imports: from copy import deepcopy
  from typing import TYPE_CHECKING, Callable, Tuple, Union
  import numpy
  import plotly.graph_objects
  from sklearn.pipeline import Pipeline
  from deepchecks.core import CheckResult, ConditionCategory, ConditionResult
  from deepchecks.core.errors import DeepchecksValueError, ModelValidationError
  from deepchecks.tabular import Context, TrainTestCheck
  from deepchecks.utils.docref import doclink
  from deepchecks.utils.model import get_model_of_pipeline
  from deepchecks.utils.strings import format_percent
label_desc: Use image node_id 3 for calling the BoostingOverfit obj's underlying member method code with example usage: obj.add_condition_test_score_percent_decline_less_than(threshold) and returns: self, ConditionResult