code: def test_monitor_early_stopping(self):
      X, y = self.data
  
      est = GradientBoostingSurvivalAnalysis(
          loss="ipcwls",
          n_estimators=50,
          max_depth=1,
          subsample=0.5,
          random_state=0,
      )
      est.fit(X, y, monitor=early_stopping_monitor)
  
      assert est.n_estimators == 50  # this is not altered
      assert est.estimators_.shape[0] == 10
      assert est.train_score_.shape[0] == 10
      assert est.oob_improvement_.shape[0] == 10
  
imports: from contextlib import nullcontext
  from os.path import dirname, join
  import numpy
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  import pandas
  import pytest
  from sklearn.metrics import mean_squared_error
  from sksurv.column import categorical_to_numeric, standardize
  from sksurv.datasets import load_whas500
  from sksurv.ensemble import ComponentwiseGradientBoostingSurvivalAnalysis, GradientBoostingSurvivalAnalysis
  from sksurv.testing import FixtureParameterFactory, assert_cindex_almost_equal
  from sksurv.util import Surv
label_desc: Use image node_id 19 for calling the TestGradientBoosting obj's underlying member method code with example usage: obj.test_monitor_early_stopping() without return types