def METHOD_NAME(self) -> None:
    # check if server is already hosting a game
    if self.client.server.listening:
        self.client.pop_state(self)
        open_dialog(
            local_session, [T.translate("multiplayer_already_hosting")]
        )
    # not hosting, so start the process
    elif not self.client.isclient:
        # Configure this game to host
        self.client.ishost = True
        self.client.server.server.listen()
        self.client.server.listening = True
        # Enable the game, so we can connect to self
        self.client.client.enable_join_multiplayer = True
        self.client.client.client.listen()
        self.client.client.listening = True
        # connect to self
        while not self.client.client.client.registered:
            self.client.client.client.autodiscover(autoregister=False)
            for game in self.client.client.client.discovered_servers:
                self.client.client.client.register(game)
        # close this menu
        self.client.pop_state(self)
        # inform player that hosting is ready
        open_dialog(
            local_session, [T.translate("multiplayer_hosting_ready")]
        )