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: Return a message header fragment dict.
  
  Args:
      request_id (str or None) :
          Message ID of the message this message replies to
  
  Returns:
      dict : a message header
docstr_tok: ["Return","a","message","header","fragment","dict",".","Args",":","request_id","(","str","or","None",")",":","Message","ID","of","the","message","this","message","replies","to","Returns",":","dict",":","a","message","header"]
code: def create_header(cls, request_id: ID | None = None) -> Header:
      """Return a message header fragment dict.
  
      Args:
          request_id (str or None) :
              Message ID of the message this message replies to
  
      Returns:
          dict : a message header
  
      """
      header = Header(
          msgid=bkserial.make_id(),
          msgtype=cls.msgtype,
      )
      if request_id is not None:
          header["reqid"] = request_id
      return header
  
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 6 for calling the Message obj's underlying member method code with example usage: obj.create_header(cls, request_id) and returns: header