def _get_preview(self):
    self._check_camera_open()
    if isinstance(self._preview, PiPreviewRenderer):
        return self._preview
def _get_preview(self):
    self._check_camera_open()
    if isinstance(self._preview, PiPreviewRenderer):
        return self._preview