def METHOD_NAME(self, exp):
    global app, font_database
    # Add the Qt plugin folders to the library path, if they exists. Where
    # these folders are depends on the version of Qt4, but these are two
    # possible locations.
    qt_plugin_path = os.path.join(
        os.path.dirname(sys.executable), 'Library', 'plugins')
    if os.path.isdir(qt_plugin_path):
        QCoreApplication.addLibraryPath(
            safe_decode(qt_plugin_path, enc=sys.getfilesystemencoding())
        )
    qt_plugin_path = os.path.join(
        os.path.dirname(sys.executable), 'Library', 'lib', 'qt4', 'plugins')
    if os.path.isdir(qt_plugin_path):
        QCoreApplication.addLibraryPath(
            safe_decode(qt_plugin_path, enc=sys.getfilesystemencoding())
        )
    # If no instance of QApplication exists, a segmentation fault seems to
    # always occur. So we create one.
    if QCoreApplication.instance() is None:
        app = QApplication([])
    # Register the fonts bundled with OpenSesame
    if font_database is None:
        try:
            font_database = QFontDatabase()
        except TypeError:
            # PyQt6 the class is used directly, without creating an
            # instance
            font_database = QFontDatabase
        for font in FONTS:
            self._register_font(exp, font)