class_docstr: Wraps a websocket connection to a client.
  
      
class_docstr_tok: ["Wraps","a","websocket","connection","to","a","client","."]
docstr: Sends a PATCH-DOC message, returning a Future that's completed when it's written out. 
docstr_tok: ["Sends","a","PATCH-DOC","message",",","returning","a","Future","that","'s","completed","when","it","'s","written","out","."]
code: def send_patch_document(
      self, event: DocumentPatchedEvent
  ) -> Awaitable[None]:
      """Sends a PATCH-DOC message, returning a Future that's completed when it's written out."""
      msg = self.protocol.create("PATCH-DOC", [event])
      # yes, *return* the awaitable, it will be awaited when pending writes are processed
      return self._socket.send_message(msg)
  
file_path: bokeh/src/bokeh/server/connection.py
imports: from __future__ import annotations
  import logging
  from typing import TYPE_CHECKING, Any, Awaitable
label_desc: Use image node_id 7 for calling the ServerConnection obj's underlying member method code with example usage: obj.send_patch_document(event) and returns: self