code: def create_app():
      
      global QT_APP
      QT_APP = QApplication.instance()
      if QT_APP is None:  # pragma: no cover
          QT_APP = QApplication(sys.argv)
      return QT_APP
docs: Create a Qt application.