code: def test_get_session_failure(self) -> None:
      c = bsc.ApplicationContext("app", io_loop="ioloop")
      c._sessions = dict(foo=1, bar=2)
      with pytest.raises(bsc.ProtocolError) as e:
          c.get_session("bax")
      assert str(e.value).endswith("No such session bax")
  
file_path: bokeh/tests/unit/bokeh/server/test_contexts.py
imports: from __future__ import annotations
  import pytest
  import asyncio
  import gc
  from tornado.ioloop import IOLoop
  from bokeh.application import Application
  import bokeh.server.contexts
label_desc: Use image node_id 4 for calling the TestApplicationContext obj's underlying member method code with example usage: obj.test_get_session_failure() without return types