code: def intervals_to_boundaries(intervals, q=5):
      
  
      return np.unique(np.ravel(np.round(intervals, decimals=q)))
docs: Convert interval times into boundaries.
  
      Parameters
      ----------
      intervals : np.ndarray, shape=(n_events, 2)
          Array of interval start and end-times
      q : int
          Number of decimals to round to. (Default value = 5)
  
      Returns
      -------
      boundaries : np.ndarray
          Interval boundary times, including the end of the final interval