def _fill_next_rows(self, rows, line):
        unmerged_rows = OrderedDict()

        for column, cell in enumerate(rows[line]):
            if isinstance(cell, TableCell) and cell.rowspan > 1:
                nb_lines = cell.rowspan - 1
                lines = [cell]

                if '\n' in cell:
                    lines = cell.split('\n')
                    if len(lines) > nb_lines:
                        nb_lines = cell.count('\n')

                    rows[line][column] = TableCell(lines[0], colspan=cell.colspan)

                # Create a two dimensional array (rowspan x colspan)
                placeholder = OrderedDict([(k, OrderedDict()) for k in range(line + 1, line + 1 + nb_lines)])
                for k, v in unmerged_rows.items():
                    if k in placeholder:
                        for l, m in unmerged_rows[k].items():
                            if l in placeholder[k]:
                                placeholder[k][l].update(m)
                            else:
                                placeholder[k][l] = m
                    else:
                        placeholder[k] = v

                unmerged_rows = placeholder

                for unmerged_row_key, unmerged_row in unmerged_rows.items():
                    value = ''
                    if unmerged_row_key - line < len(lines):
                        value = lines[unmerged_row_key - line]

                    unmerged_rows[unmerged_row_key][column] = TableCell(value, colspan=cell.colspan)

        for unmerged_row_key, unmerged_row in unmerged_rows.items():
            # we need to know if unmerged_row will be merged or inserted into rows
            if (unmerged_row_key < len(rows)
                and isinstance(rows[unmerged_row_key], list)
                and (self._get_number_of_columns(rows[unmerged_row_key])
                     + self._get_number_of_columns(list(unmerged_rows[unmerged_row_key].values()))
                        <= self._number_of_columns)):
                # insert cell into row at cell_key position
                for cell_key, cell in unmerged_row.items():
                    rows[unmerged_row_key].insert(cell_key, cell)
            else:
                row = self._copy_row(rows, unmerged_row_key - 1)
                for column, cell in unmerged_row.items():
                    if len(cell):
                        row[column] = unmerged_row[column]

                rows.insert(unmerged_row_key, row)

        return rows
check if doc field types match the doc field structure
dataset/ETHPy150Open sdispater/cleo/cleo/helpers/table.py/Table._fill_next_rows--crossover with--dataset/ETHPy150Open namlook/mongokit/mongokit/schema_document.py/SchemaDocument._validate_doc