def splitCentersByMeasures(centers, splitter_dict, offset_measure=0):
    """
    Split list of note centers by measures
    """
    # Sort by columns
    column_sorted_centers = sorted(centers, key=lambda x: x[0])

    keys = list(
        filter(
            lambda x: x >= offset_measure,
            sorted(
                splitter_dict.keys())))
    measures = {}
    current_offset = 0
    total_counter = 0
    counter = 0
    for key in keys:
        measure = []
        counter = 0
        for note_center in column_sorted_centers[current_offset:]:
            measure.append(note_center)
            counter += 1
            if counter == splitter_dict[key]:
                break

        measures[key] = measure
        current_offset += counter
        total_counter += counter

        if total_counter >= len(centers):
            return measures, key

    assert False, "Should haven't been here"
    return None