def _rectangle_size(rectangle):
    """Return the dimension of rectangle (width, height)."""
    return rectangle.upperRight[0] - rectangle.lowerLeft[0
        ], rectangle.upperRight[1] - rectangle.lowerLeft[1]
