def _get_windows(peak_list):
    """
    Given a list of peaks, bin them into windows.
    """
    win_list = []
    for hints in peak_list:
        p_w = hints['t0'], hints['t1']
        for w in win_list:
            if p_w[0] <= w[0][1] and p_w[1] >= w[0][0]:
                w[0] = min(p_w[0], w[0][0]), max(p_w[1], w[0][1])
                w[1].append(hints)
                break
        else:
            win_list.append([p_w, [hints]])
    return win_list
