<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def overlap(r1: 'Rectangle', r2: 'Rectangle'):
 """ Overlapping rectangles overlap both horizontally & vertically """

        h_overlaps = (r1.left <= r2.right) and (r1.right >= r2.left)
        v_overlaps = (r1.bottom >= r2.top) and (r1.top <= r2.bottom)
        return h_overlaps and v_overlaps