docs: def get_intersection(bbox1, bbox2):
      """
      :param bbox1: (page, width, height, top, left, bottom, right)
      :param bbox2: (page, width, height, top, left, bottom, right)
      :return: intersection if bboxes are in the same page and intersect
      """
      intersection = []
      page_1, page_width, page_height, top_1, left_1, bottom_1, right_1 = bbox1
      page_2, _, _, top_2, left_2, bottom_2, right_2 = bbox2
      if page_1 == page_2:
          if doOverlap(
              (top_1, left_1, bottom_1, right_1), (top_2, left_2, bottom_2, right_2)
          ):
              intersection += [
                  (
                      page_1,
                      page_width,
                      page_height,
                      max(top_1, top_2),
                      max(left_1, left_2),
                      min(bottom_1, bottom_2),
                      min(right_1, right_2),
                  )
              ]
      return intersection