<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def boundaries_to_intervals(boundaries):
 """Convert an array of event times into intervals Parameters boundaries : list-like List-like of event times. These are assumed to be unique timestamps in ascending order. Returns ------- intervals : np.ndarray, shape=(n_intervals, 2) Start and end time for each interval """


    if not np.allclose(boundaries, np.unique(boundaries)):
        raise ValueError('Boundary times are not unique or not ascending.')

    intervals = np.asarray(list(zip(boundaries[:-1], boundaries[1:])))

    return intervals