code: def _handle_pairs(truth, pred, first_ix, times_to_compare):
      """
      Handle all pairs that exited at the same time as truth[first_ix].
  
      Returns
      -------
        (pairs, correct, tied, next_ix)
        new_pairs: The number of new comparisons performed
        new_correct: The number of comparisons correctly predicted
        next_ix: The next index that needs to be handled
      """
      next_ix = first_ix
      while next_ix < len(truth) and truth[next_ix] == truth[first_ix]:
          next_ix += 1
      pairs = len(times_to_compare) * (next_ix - first_ix)
      correct = np.int64(0)
      tied = np.int64(0)
      for i in range(first_ix, next_ix):
          rank, count = times_to_compare.rank(pred[i])
          correct += rank
          tied += count
  
      return (pairs, correct, tied, next_ix)
  
file_path: lifelines/lifelines/utils/concordance.py
imports: import numpy
  from lifelines.utils.btree import _BTree
label_desc: Use image node_id 5 for calling a global function with example usage: _handle_pairs(truth, pred, first_ix, times_to_compare) and returns: pairs,  correct,  tied,  next_ix