def _get_cols(row_content):
cols = []<EOL>subcell_col = []<EOL>prev_bar = None<EOL>for _coord, item in row_content:<EOL><INDENT>if isinstance(item, LTTextLine):<EOL><INDENT>subcell_col.append(item)<EOL><DEDENT>else:  <EOL><INDENT>if prev_bar:<EOL><INDENT>bar_ranges = (prev_bar, item)<EOL>col_items = subcell_col if subcell_col else [None]<EOL>cols.extend([bar_ranges, col_items])<EOL><DEDENT>prev_bar = item<EOL>subcell_col = []<EOL><DEDENT><DEDENT>return cols<EOL>
Counting the number columns based on the content of this row