def get_rectangles(vertical_lines, horizontal_lines):
rectangles = []<EOL>i = <NUM_LIT:0><EOL>j = <NUM_LIT:0><EOL>while i < len(horizontal_lines) and j < len(vertical_lines):<EOL><INDENT>if int(horizontal_lines[i][<NUM_LIT:0>]) == vertical_lines[j][<NUM_LIT:0>]:<EOL><INDENT>if int(horizontal_lines[i][<NUM_LIT:1>]) == int(vertical_lines[j][<NUM_LIT:1>]):<EOL><INDENT>h = horizontal_lines[i]<EOL>v = vertical_lines[j]<EOL>rectangles += [(v[<NUM_LIT:0>], h[<NUM_LIT:1>], v[<NUM_LIT:2>], h[<NUM_LIT:3>])]<EOL>i += <NUM_LIT:1><EOL>j += <NUM_LIT:1><EOL><DEDENT>elif int(horizontal_lines[i][<NUM_LIT:1>]) < int(vertical_lines[j][<NUM_LIT:1>]):<EOL><INDENT>i += <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>j += <NUM_LIT:1><EOL><DEDENT><DEDENT>elif int(horizontal_lines[i][<NUM_LIT:0>]) < int(vertical_lines[j][<NUM_LIT:0>]):<EOL><INDENT>i += <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>j += <NUM_LIT:1><EOL><DEDENT><DEDENT>rectangles = [<EOL>r<EOL>for r in rectangles<EOL>if ((r[<NUM_LIT:2>] - r[<NUM_LIT:0>]) > TOLERANCE and (r[<NUM_LIT:3>] - r[<NUM_LIT:1>]) > TOLERANCE)<EOL>]<EOL>return rectangles<EOL>
:param vertical_lines: list of vertical lines coordinates
:param horizontal_lines: list of horizontal lines coordinates
:return: List of bounding boxes for tables