code: def test_server_changes_go_to_client(
      self, ManagedServerLoop: MSL
  ) -> None:
      application = Application()
      with ManagedServerLoop(application) as server:
          doc = document.Document()
  
          client_session = push_session(
              doc,
              session_id=ID("test_server_changes_go_to_client"),
              url=url(server),
              io_loop=server.io_loop,
          )
          server_session = server.get_session("/", client_session.id)
  
          assert len(client_session.document.roots) == 0
          server_root = SomeModelInTestClientServer(
              foo=42, data=bytes([0x00, 0x01, 0xFE, 0xFF])
          )
  
          def do_add_server_root():
              server_session.document.add_root(server_root)
  
          server.io_loop.add_callback(
              server_session.with_document_locked, do_add_server_root
          )
  
          def client_has_root():
              return len(doc.roots) > 0
  
          client_session._connection._loop_until(client_has_root)
          client_root = next(iter(client_session.document.roots))
  
          assert client_root.foo == 42
          assert server_root.foo == 42
  
          # Now try setting title on server side
          def do_set_server_title():
              server_session.document.title = "Server Title"
  
          server.io_loop.add_callback(
              server_session.with_document_locked, do_set_server_title
          )
  
          def client_title_set():
              return (
                  client_session.document.title
                  != document.DEFAULT_TITLE
              )
  
          client_session._connection._loop_until(client_title_set)
  
          assert client_session.document.title == "Server Title"
  
          # Now modify a model within the server document
          def do_set_property_on_server():
              server_root.foo = 57
  
          server.io_loop.add_callback(
              server_session.with_document_locked,
              do_set_property_on_server,
          )
  
          # there is no great way to block until the server
          # has applied changes, since patches are sent
          # asynchronously. We use internal _loop_until API.
          def client_change_made():
              return client_root.foo == 57
  
          client_session._connection._loop_until(client_change_made)
          assert client_root.foo == 57
  
          def do_remove_server_root():
              server_session.document.remove_root(server_root)
  
          server.io_loop.add_callback(
              server_session.with_document_locked, do_remove_server_root
          )
  
          def client_lacks_root():
              return len(doc.roots) == 0
  
          client_session._connection._loop_until(client_lacks_root)
          assert len(client_session.document.roots) == 0
  
          client_session.close()
          client_session._loop_until_closed()
          assert not client_session.connected
  
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 11 for calling the TestClientServer obj's underlying member method code with example usage: obj.test_server_changes_go_to_client(ManagedServerLoop) and returns: unknown, unknown, unknown, unknown