Returns a list that represents the table with the rowspans.

        :param ros: The list that represents the table without the rowspans.
        :type ros: list(list(hatemile.util.html.htmldomelement.HTMLDOMElement))
        :return The list that represents the table with the rowspans.
        :rtype: list(list(hatemile.util.html.htmldomelement.HTMLDOMElement))

def _get_valid_model_table(self, ros):
        """
        Returns a list that represents the table with the rowspans.

        :param ros: The list that represents the table without the rowspans.
        :type ros: list(list(hatemile.util.html.htmldomelement.HTMLDOMElement))
        :return The list that represents the table with the rowspans.
        :rtype: list(list(hatemile.util.html.htmldomelement.HTMLDOMElement))
        """
        # pylint: disable=no-self-use

        new_table = []
        if bool(ros):
            length_table = len(ros)
            for row_index in range(0, length_table):
                cells_added = 0
                original_row = [] + ros[row_index]
                if len(new_table) <= row_index:
                    new_table.append([])
                length_row = len(original_row)
                for cell_index in range(0, length_row):
                    cell = original_row[cell_index]
                    new_cell_index = cell_index + cells_added
                    new_row = new_table[row_index]
                    while True:
                        if len(new_row) <= new_cell_index:
                            new_row.append(None)
                            break
                        elif new_row[new_cell_index] is None:
                            break
                        else:
                            cells_added += 1
                            new_cell_index = cell_index + cells_added
                    new_row[new_cell_index] = cell
                    if cell.has_attribute('rowspan'):
                        rowspan = int(cell.get_attribute('rowspan'))
                        if rowspan > 1:
                            for rowspan_index in range(1, rowspan):
                                new_row_index = row_index + rowspan_index
                                if len(new_table) <= new_row_index:
                                    new_table.append([])
                                while (
                                    len(new_table[new_row_index])
                                    < new_cell_index
                                ):
                                    new_table[new_row_index].append(None)
                                new_table[new_row_index].append(cell)
        return new_table