def normalize(self):
if self.x1 < self.x0:<EOL><INDENT>self.x0, self.x1 = self.x1, self.x0<EOL><DEDENT>if self.y1 < self.y0:<EOL><INDENT>self.y0, self.y1 = self.y1, self.y0<EOL><DEDENT>return self<EOL>
Replace rectangle with its finite version.