<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_grid(self):
 """ Standardize the layout of the table into grids """

        mentions, lines = _split_text_n_lines(self.elems)
        # Sort mentions in reading order where y values are snapped to half
        # height-sized grid
        mentions.sort(key=lambda m: (m.yc_grid, m.xc))

        grid = Grid(mentions, lines, self)
        return grid