def run(command_argument: command_arguments.CommandArguments, base_directory: Path, remote_logging: Optional[backend_arguments.RemoteLogging]) -> int:

    def read_server_start_options() -> PyreServerStartOptions:
        return PyreServerStartOptions.read_from(command_argument, base_directory)
    command_timer = timer.Timer()
    error_message: Optional[str] = None
    try:
        return asyncio.get_event_loop().run_until_complete(run_persistent(read_server_start_options, remote_logging))
    except Exception as error:
        error_message = str(error)
        return 1
    finally:
        _log_lsp_event(remote_logging, LSPEvent.STOPPED, integers={'duration': int(command_timer.stop_in_millisecond())}, normals={**({'exception': error_message} if (error_message is not None) else {})})
def run(command_argument: command_arguments.CommandArguments, base_directory: Path, remote_logging: Optional[backend_arguments.RemoteLogging]) -> int:

    def read_server_start_options() -> PyreServerStartOptions:
        return PyreServerStartOptions.read_from(command_argument, base_directory)
    command_timer = timer.Timer()
    error_message: Optional[str] = None
    try:
        return asyncio.get_event_loop().run_until_complete(run_persistent(read_server_start_options, remote_logging))
    except Exception as error:
        error_message = str(error)
        return 1
    finally:
        _log_lsp_event(remote_logging, LSPEvent.STOPPED, integers={'duration': int(command_timer.stop_in_millisecond())}, normals={**({'exception': error_message} if (error_message is not None) else {})})