def get_normalized_grid(self):
log = logging.getLogger(__name__)<EOL>mega_rows = []<EOL>for row_id, row in enumerate(self._grid):<EOL><INDENT>subrow_across_cell = defaultdict(list)<EOL>for col_id, cell in enumerate(row):<EOL><INDENT>cell.texts.sort(key=cmp_to_key(reading_order))<EOL>log.debug("<STR_LIT:=>" * <NUM_LIT:50>)<EOL>for m in cell.texts:<EOL><INDENT>subrow_across_cell[m.yc_grid].append(m)<EOL><DEDENT><DEDENT>log.debug(pformat(dict(subrow_across_cell)))<EOL>mega_rows.append(subrow_across_cell)<EOL><DEDENT>return mega_rows<EOL>
Analyzes subcell structure