def uncompress_indices(compressed):
    """Reverse of compress_indices.
    """
    indices = []
    for i in range(len(compressed) - 1):
        indices.extend([i] * (compressed[i+1] - compressed[i]))
    return indices