def frameBounds(self, bounds):
        if bounds.isEmpty():
            return
        widthAdjust = bounds.width() * 0.2
        heightAdjust = bounds.height() * 0.2
        bounds.adjust(-widthAdjust, -heightAdjust, widthAdjust, heightAdjust)
        self.fitInView(bounds, QtCore.Qt.KeepAspectRatio)
Frames a given bounding rectangle within the viewport.
dataset/ETHPy150Open andrew-gardner/dependsworkflow/depends/depends_graphics_widgets.py/GraphicsViewWidget.frameBounds