def bounding_box(rects):
    """
    Get a new Rect which circumscribes all the rects.

    :param list rects
    :return bounding Rect
    :rtype Rect
    """

    top = float('inf')
    left = float('inf')
    bottom = 0
    right = 0
    for rect in rects:
        top_left, bottom_right = rect
        top = min(top, top_left[1])
        left = min(left, top_left[0])
        bottom = max(bottom, bottom_right[1])
        right = max(right, bottom_right[0])

    return ((left, top), (right, bottom))