class_docstr: Provide a message factory for the Bokeh Server message protocol.
  
      
docstr: Create a Message instance assembled from json fragments.
  
  Args:
      header_json (``JSON``) :
  
      metadata_json (``JSON``) :
  
      content_json (``JSON``) :
  
  Returns:
      message
docstr_tok: ["Create","a","Message","instance","assembled","from","json","fragments",".","Args",":","header_json","(","``","JSON","``",")",":","metadata_json","(","``","JSON","``",")",":","content_json","(","``","JSON","``",")",":","Returns",":","message"]
code: def assemble(
      self, header_json: str, metadata_json: str, content_json: str
  ) -> Message[Any]:
      """Create a Message instance assembled from json fragments.
  
      Args:
          header_json (``JSON``) :
  
          metadata_json (``JSON``) :
  
          content_json (``JSON``) :
  
      Returns:
          message
  
      """
      header = json.loads(header_json)
      if "msgtype" not in header:
          log.error(f"Bad header with no msgtype was: {header!r}")
          raise ProtocolError("No 'msgtype' in header")
      return self._messages[header["msgtype"]].assemble(
          header_json, metadata_json, content_json
      )
  
imports: from __future__ import annotations
  import logging
  import json
  from typing import TYPE_CHECKING, Any, Literal, overload
  from .exceptions import ProtocolError
  from .message import Message
  from .messages.ack import ack
  from .messages.error import error
  from .messages.ok import ok
  from .messages.patch_doc import patch_doc
  from .messages.pull_doc_reply import pull_doc_reply
  from .messages.pull_doc_req import pull_doc_req
  from .messages.push_doc import push_doc
  from .messages.server_info_reply import server_info_reply
  from .messages.server_info_req import server_info_req
label_desc: Use image node_id 13 for calling the Protocol obj's underlying member method code with example usage: obj.assemble(header_json, metadata_json, content_json) and returns: self