def METHOD_NAME():
    pairs = np.asarray([[1, 1], [2, 1], [3, 1], [4, 1]], dtype=int)
    out = np.empty(7, dtype=int)
    offset_to_sorted_block(pairs, out)
    assert np.all(out == [0, 0, 1, 2, 3, 4, 4])