<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _generate_splits(self, m, r):
 """ When a rectangle is placed inside a maximal rectangle, it stops being one and up to 4 new maximal rectangles may appear depending on the placement. _generate_splits calculates them. Arguments: m (Rectangle):
 max_rect rectangle r (Rectangle):
 rectangle placed Returns: list : list containing new maximal rectangles or an empty list """

        new_rects = []
        
        if r.left > m.left:
            new_rects.append(Rectangle(m.left, m.bottom, r.left-m.left, m.height))
        if r.right < m.right:
            new_rects.append(Rectangle(r.right, m.bottom, m.right-r.right, m.height))
        if r.top < m.top:
            new_rects.append(Rectangle(m.left, r.top, m.width, m.top-r.top))
        if r.bottom > m.bottom:
            new_rects.append(Rectangle(m.left, m.bottom, m.width, r.bottom-m.bottom))
        
        return new_rects