pub fn validate_2d_structure<F>(data: &[FieldElement<F>], width: usize) -> bool
where
    F: IsField,
{
    let rows: Vec<Vec<FieldElement<F>>> = data.chunks(width).map(|c| c.to_vec()).collect();
    rows.iter().all(|r| r.len() == rows[0].len())
}
Validates that the one-dimensional array `data` can be interpreted as two-dimensional
array, returning a true when valid and false when not.
crates/provers/stark/src/debug.rs