code: def test_client_session_next_tick_async_added_before_push(
      self, ManagedServerLoop: MSL
  ) -> None:
      application = Application()
      with ManagedServerLoop(application) as server:
          doc = document.Document()
  
          result = DictModel()
          doc.add_root(result)
  
          async def cb():
              result.values["a"] = 0
              result.values["b"] = await self.async_value(1)
              result.values["c"] = await self.async_value(2)
              result.values["d"] = await self.async_value(3)
              result.values["e"] = await self.async_value(4)
              client_session.close()
              return 5
  
          cb_id = doc.add_next_tick_callback(cb)
  
          client_session = push_session(
              doc,
              session_id=ID("test_client_session_next_tick_async"),
              url=url(server),
              io_loop=server.io_loop,
          )
  
          client_session._loop_until_closed()
  
          with pytest.raises(ValueError) as exc:
              doc.remove_next_tick_callback(cb_id)
          assert "already removed" in repr(exc.value)
  
          assert dict(a=0, b=1, c=2, d=3, e=4) == result.values
  
imports: from __future__ import annotations
  import pytest
  import asyncio
  import logging
  import sys
  from unittest.mock import MagicMock, patch
  from tornado.httpclient import HTTPError
  import bokeh.document
  from bokeh.application import Application
  from bokeh.application.handlers import FunctionHandler
  from bokeh.client import ClientSession, pull_session, push_session
  from bokeh.core.properties import AngleSpec, Any, Bytes, Dict, DistanceSpec, Instance, Int, Nullable, String
  from bokeh.core.types import ID
  from bokeh.document import Document
  from bokeh.document.events import ModelChangedEvent, TitleChangedEvent
  from bokeh.model import Model
  from bokeh.models import ColumnDataSource, Plot
  from bokeh.util.token import generate_jwt_token
  from tests.support.plugins.managed_server_loop import MSL
  from tests.support.util.env import envset
  from server._util_server import http_get, url, websocket_open, ws_url
label_desc: Use image node_id 16 for calling the TestClientServer obj's underlying member method code with example usage: obj.test_client_session_next_tick_async_added_before_push(ManagedServerLoop) and returns: int