<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scale_view(self, x, y):
 """ Scale the zoom but keep in in the min and max zoom bounds. """

        d = self.declaration
        factor = self.widget.transform().scale(x, y).mapRect(
            QRectF(0, 0, 1, 1)).width()
        if (d.min_zoom > factor > d.max_zoom):
            return
        self.widget.scale(x, y)
        return factor