code: def _array_to_step_function(x, array):
      n_samples = array.shape[0]
      funcs = np.empty(n_samples, dtype=np.object_)
      for i in range(n_samples):
          funcs[i] = StepFunction(x=x, y=array[i])
      return funcs
  
imports: from math import ceil
  from numbers import Integral, Real
  import numpy
  from scipy.sparse import issparse
  from sklearn.base import BaseEstimator
  from sklearn.tree import _tree
  from sklearn.tree._classes import DENSE_SPLITTERS, SPARSE_SPLITTERS
  from sklearn.tree._splitter import Splitter
  from sklearn.tree._tree import BestFirstTreeBuilder, DepthFirstTreeBuilder, Tree
  from sklearn.tree._utils import _any_isnan_axis0
  from sklearn.utils._param_validation import Interval, StrOptions
  from sklearn.utils.validation import _assert_all_finite_element_wise, assert_all_finite, check_is_fitted, check_random_state
  from ..base import SurvivalAnalysisMixin
  from ..functions import StepFunction
  from ..util import check_array_survival
  from ._criterion import LogrankCriterion, get_unique_times
label_desc: Use image node_id 1 for calling a global function with example usage: _array_to_step_function(x, array) and returns: funcs