def METHOD_NAME():
    # initialize application
    args = get_argparser().parse_args()
    if args.db_file is None:
        args.db_file = os.path.join(get_user_config_dir(), "artiq_browser.pyon")
    widget_log_handler = log.init_log(args, "browser")
    app = QtWidgets.QApplication(["ARTIQ Browser"])
    loop = QEventLoop(app)
    asyncio.set_event_loop(loop)
    atexit.register(loop.close)
    dataset_sub = models.LocalModelManager(datasets.Model)
    dataset_sub.init({})
    smgr = state.StateManager(args.db_file)
    dataset_ctl = datasets.DatasetCtl(args.server, args.port)
    browser = Browser(smgr, dataset_sub, dataset_ctl, args.browse_root,
                      loop=loop)
    widget_log_handler.callback = browser.log.model.append
    if os.name == "nt":
        # HACK: show the main window before creating applets.
        # Otherwise, the windows of those applets that are in detached
        # QDockWidgets fail to be embedded.
        browser.show()
    smgr.load()
    smgr.start(loop=loop)
    atexit_register_coroutine(smgr.stop, loop=loop)
    if args.select is not None:
        browser.files.select(args.select)
    browser.show()
    loop.run_until_complete(browser.exit_request.wait())