def check_width(self):
        row_widths = {len(row) for row in self.data}
        if len(row_widths) > 1:
            raise ValueError('All rows must have equal length.')
        return row_widths.pop()
dataset/ETHPy150Open fluentpython/example-code/attic/sequences/table.py/Table.check_width/original