code: def _iter_comparable(event_indicator, event_time, order):
      n_samples = len(event_time)
      tied_time = 0
      i = 0
      while i < n_samples - 1:
          time_i = event_time[order[i]]
          end = i + 1
          while end < n_samples and event_time[order[end]] == time_i:
              end += 1
  
          # check for tied event times
          event_at_same_time = event_indicator[order[i:end]]
          censored_at_same_time = ~event_at_same_time
          for j in range(i, end):
              if event_indicator[order[j]]:
                  mask = np.zeros(n_samples, dtype=bool)
                  mask[end:] = True
                  # an event is comparable to censored samples at same time point
                  mask[i:end] = censored_at_same_time
                  tied_time += censored_at_same_time.sum()
                  yield (j, mask, tied_time)
          i = end
  
imports: import numpy
  from sklearn.base import BaseEstimator
  from sklearn.utils import check_array, check_consistent_length
  from sklearn.utils.metaestimators import available_if
  from sklearn.utils.validation import check_is_fitted
  from .exceptions import NoComparablePairException
  from .nonparametric import CensoringDistributionEstimator, SurvivalFunctionEstimator
  from .util import check_y_survival
label_desc: Use image node_id 5 for calling a global function with example usage: _iter_comparable(event_indicator, event_time, order) without return types