<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rectangle(self):
 """Accessor for the rectangle. :return: A rectangle showing the designed extent. :rtype: QgsRectangle """

        if self.start_point is None or self.end_point is None:
            return QgsRectangle()
        elif self.start_point.x() == self.end_point.x() or \
                self.start_point.y() == self.end_point.y():
            return QgsRectangle()

        return QgsRectangle(self.start_point, self.end_point)