pub fn apply_dim_partitions( dims: &[usize], partitions: &[DimPartition], ) -> (Vec<usize>, Vec<usize>)