class_docstr: The Message base class encapsulates creating, assembling, and
  validating the integrity of Bokeh Server messages. Additionally, it
  provide hooks
class_docstr_tok: ["The","Message","base","class","encapsulates","creating",",","assembling",",","and","validating","the","integrity","of","Bokeh","Server","messages",".","Additionally",",","it","provide","hooks"]
docstr: Initialize a new message from header, metadata, and content
  dictionaries.
  
  To assemble a message from existing JSON fragments, use the
  ``assemble`` method.
  
  To create new messages with automatically generated headers,
  use subclass ``create`` methods.
  
  Args:
      header (JSON-like) :
  
      metadata (JSON-like) :
  
      content (JSON-like) :
docstr_tok: ["Initialize","a","new","message","from","header",",","metadata",",","and","content","dictionaries",".","To","assemble","a","message","from","existing","JSON","fragments",",","use","the","``","assemble","``","method",".","To","create","new","messages","with","automatically","generated","headers",",","use","subclass","``","create","``","methods",".","Args",":","header","(","JSON-like",")",":","metadata","(","JSON-like",")",":","content","(","JSON-like",")",":"]
code: def __init__(
      self, header: Header, metadata: Metadata, content: Content
  ) -> None:
      """Initialize a new message from header, metadata, and content
      dictionaries.
  
      To assemble a message from existing JSON fragments, use the
      ``assemble`` method.
  
      To create new messages with automatically generated headers,
      use subclass ``create`` methods.
  
      Args:
          header (JSON-like) :
  
          metadata (JSON-like) :
  
          content (JSON-like) :
  
      """
      self.header = header
      self.metadata = metadata
      self.content = content
      self._buffers = []
  
imports: from __future__ import annotations
  import logging
  import json
  from typing import TYPE_CHECKING, Any, ClassVar, Generic, TypedDict, TypeVar
  import bokeh.util.serialization
  from ..core.json_encoder import serialize_json
  from ..core.serialization import Buffer, Serialized
  from ..core.types import ID
  from .exceptions import MessageError, ProtocolError
label_desc: Use image node_id 1 to create a new Message object from inherited base classes: Generic with example: obj = Message(header, metadata, content)