code: def test_predict_function(make_whas500, fn, expected_file):
      whas500_data = make_whas500(with_std=False, to_numeric=True)
  
      model = ComponentwiseGradientBoostingSurvivalAnalysis(
          n_estimators=100, random_state=0
      )
      train_x, train_y = whas500_data.x[10:], whas500_data.y[10:]
      model.fit(train_x, train_y)
  
      test_x = whas500_data.x[:10]
      surv_fn = getattr(model, fn)(test_x)
  
      times = np.unique(train_y["lenfol"][train_y["fstat"]])
      actual = np.row_stack([fn_gb(times) for fn_gb in surv_fn])
  
      expected = np.loadtxt(expected_file, delimiter=",")
  
      assert_array_almost_equal(actual, expected)
  
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 4 for calling the TestComponentwiseGradientBoosting obj's underlying member method code with example usage: obj.test_predict_function(make_whas500, fn, expected_file) without return types