def METHOD_NAME(shape, size):
    if shape.type == ShapeType.RECTANGLE:
        shape.points = [
            shape.points[2], # xbr -> xtl
            shape.points[3], # ybr -> ytl
            shape.points[0], # xtl -> xbr
            shape.points[1]  # ytl -> ybr
        ]
    for x in range(0, len(shape.points), 2):
        y = x + 1
        shape.points[x] = size['width'] - shape.points[x]
        shape.points[y] = size['height'] - shape.points[y]