code: def intersect_boxes(box1, box2):
      
      if not box1 and not box2: return None
      if not box1: return box2
      if not box2: return box1
      intersect = RectangleObject([0, 0, 0, 0]) # Note [llx,lly,urx,ury] == [l,b,r,t]
      intersect.upperRight = (min(box1.upperRight[0], box2.upperRight[0]),
                              min(box1.upperRight[1], box2.upperRight[1]))
      intersect.lowerLeft = (max(box1.lowerLeft[0], box2.lowerLeft[0]),
                             max(box1.lowerLeft[1], box2.lowerLeft[1]))
      return intersect
docs: Takes two pyPdf boxes (such as page.mediaBox) and returns the pyPdf
      box which is their intersection.