First result googling "PyGame Rect Normalize":
normalize()
correct negative sizes
normalize() -> None
This will flip the width or height of a rectangle if it has a negative size. The rectangle will remain in the same place, with only the sides swapped.
So in essence it ensures the width and height are positive, not negative.