def METHOD_NAME():
    """Run application and return its exit code."""
    set_up_python()
    rename_process(b"nicotine")
    headless, hidden, ci_mode, rescan, multi_instance = check_arguments()
    error = check_python_version()
    if error:
        print(error)
        return 1
    core.init_components(enabled_components={"cli", "shares"} if rescan else None)
    # Dump tracebacks for C modules (in addition to pure Python code)
    try:
        import faulthandler
        faulthandler.enable()
    except Exception as error:
        log.add(f"Faulthandler module could not be enabled. Error: {error}")
    if not os.path.isdir(LOCALE_PATH):
        log.add("Translation files (.mo) are unavailable, using default English strings")
    if rescan:
        return rescan_shares()
    # Initialize GTK-based GUI
    if not headless:
        from pynicotine import gtkgui as application
        exit_code = application.METHOD_NAME(hidden, ci_mode, multi_instance)
        if exit_code is not None:
            return exit_code
    # Run without a GUI
    from pynicotine import headless as application
    return application.METHOD_NAME()