code: def cluster_coincs(stat, time1, time2, timeslide_id, slide, window, argmax=numpy.argmax):
      
  
      logging.info('clustering coinc triggers over %ss window' % window)
  
      if len(time1) == 0 or len(time2) == 0:
          logging.info('No coinc triggers in one, or both, ifos.')
          return numpy.array([])
  
      if numpy.isfinite(slide):
          # for a time shifted coinc, time1 is greater than time2 by approximately timeslide_id*slide
          # adding this quantity gives a mean coinc time located around time1
          time = (time1 + time2 + timeslide_id * slide) / 2
      else:
          time = 0.5 * (time2 + time1)
  
      tslide = timeslide_id.astype(numpy.float128)
      time = time.astype(numpy.float128)
  
      span = (time.max() - time.min()) + window * 10
      time = time + span * tslide
      cidx = cluster_over_time(stat, time, window, argmax)
      return cidx
docs: Cluster coincident events for each timeslide separately, across
      templates, based on the ranking statistic
  
      Parameters
      ----------
      stat: numpy.ndarray
          vector of ranking values to maximize
      time1: numpy.ndarray
          first time vector
      time2: numpy.ndarray
          second time vector
      timeslide_id: numpy.ndarray
          vector that determines the timeslide offset
      slide: float
          length of the timeslides offset interval
      window: float
          length to cluster over
  
      Returns
      -------
      cindex: numpy.ndarray
          The set of indices corresponding to the surviving coincidences.