class_docstr: Base class for forest-based estimators for survival analysis.
  
  Warning: This class should not be used directly. Use derived classes
  instead.
code: def _predict(self, predict_fn, X):
      check_is_fitted(self, "estimators_")
      # Check data
      X = self._validate_X_predict(X)
  
      # Assign chunk of trees to jobs
      n_jobs, _, _ = _partition_estimators(
          self.n_estimators, self.n_jobs
      )
  
      # avoid storing the output of every estimator by summing them here
      if predict_fn == "predict":
          y_hat = np.zeros((X.shape[0]), dtype=np.float64)
      else:
          y_hat = np.zeros(
              (X.shape[0], self.n_outputs_), dtype=np.float64
          )
  
      def _get_fn(est, name):
          fn = getattr(est, name)
          if name in (
              "predict_cumulative_hazard_function",
              "predict_survival_function",
          ):
              fn = partial(fn, return_array=True)
          return fn
  
      # Parallel loop
      lock = threading.Lock()
      Parallel(
          n_jobs=n_jobs, verbose=self.verbose, require="sharedmem"
      )(
          delayed(_accumulate_prediction)(
              _get_fn(e, predict_fn), X, [y_hat], lock
          )
          for e in self.estimators_
      )
  
      y_hat /= len(self.estimators_)
  
      return y_hat
  
imports: from abc import ABCMeta, abstractmethod
  from functools import partial
  import threading
  import warnings
  from joblib import Parallel, delayed
  import numpy
  from sklearn.ensemble._base import _partition_estimators
  from sklearn.ensemble._forest import BaseForest, _accumulate_prediction, _generate_unsampled_indices, _get_n_samples_bootstrap, _parallel_build_trees
  from sklearn.tree._tree import DTYPE
  from sklearn.utils.validation import check_is_fitted, check_random_state
  from ..base import SurvivalAnalysisMixin
  from ..metrics import concordance_index_censored
  from ..tree import SurvivalTree
  from ..tree._criterion import get_unique_times
  from ..tree.tree import _array_to_step_function
  from ..util import check_array_survival
label_desc: Use image node_id 5 for calling the _BaseSurvivalForest obj's underlying member method code with example usage: obj._predict(predict_fn, X) and returns: y_hat, fn