def valid_intervals(intervals):

    if intervals.ndim != 2 or intervals.shape[-1] != 2:
        raise ParameterError('intervals must have shape (n, 2)')

    return True
Ensure that an array is a valid representation of time intervals:
dataset/ETHPy150Open bmcfee/librosa/librosa/util/utils.py/valid_intervals