function processCounts(table) {
const dimLengths = table.dimensions.map((d) => d.count);
const dimIndices = table.dimensions.map(() => 0);
let result = [];
for (let i = 0; i < table.values.length; i++) {
result.push(populateRow(table, dimIndices, i));
let j = dimIndices.length - 1;
while (j >= 0) {
dimIndices[j] += 1;
if (dimIndices[j] < dimLengths[j]) break;
dimIndices[j] = 0;
j -= 1;
}
}
return result;
}