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