def METHOD_NAME(self):
    if not self._rectangles:
        self.stop()
        self._window.set_position(self._destination)
        return
    try:
        rectangle = next(self._rectangles)
    except StopIteration:
        self._rectangles = None
        self.stop()
        rectangle = self._destination
    self._window.set_position(rectangle)