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: Return check instance config.
docstr_tok: ["Return","check","instance","config","."]
code: def config(
      self, include_version: bool = True, include_defaults: bool = True
  ) -> "CheckConfig":
      """Return check instance config."""
      if self.alternative_scorer is not None:
          for k, v in self.alternative_scorer.items():
              if not isinstance(v, str):
                  reference = doclink(
                      "supported-metrics-by-string",
                      template="For a list of built-in scorers please refer to {link}. ",
                  )
                  raise ValueError(
                      "Only built-in scorers are allowed when serializing check instances. "
                      f"{reference}Scorer name: {k}"
                  )
      return super().config(
          include_version, include_defaults=include_defaults
      )
  
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 4 for calling the BoostingOverfit obj's underlying member method code with example usage: obj.config(include_version, include_defaults) and returns: super