def METHOD_NAME(use_gui, xvfb, request):
    _set_qt_binding(request.config.option.qt_binding)
    from silx.gui import qt
    app = qt.QApplication.instance()
    if app is None:
        app = qt.QApplication([])
    try:
        yield app
    finally:
        if app is not None:
            app.closeAllWindows()