class_docstr: Hosts an application "instance" (an instantiated Document) for one or more connections.
  
      
class_docstr_tok: ["Hosts","an","application","``","instance","''","(","an","instantiated","Document",")","for","one","or","more","connections","."]
docstr: Handle a PATCH-DOC, return a Future with work to be scheduled. 
code: def patch(
      cls, message: msg.patch_doc, connection: ServerConnection
  ) -> msg.ok:
      """Handle a PATCH-DOC, return a Future with work to be scheduled."""
      return connection.session._handle_patch(message, connection)
  
imports: from __future__ import annotations
  import logging
  import inspect
  import time
  from copy import copy
  from functools import wraps
  from typing import TYPE_CHECKING, Any, Awaitable, Callable, TypeVar
  from tornado import locks
  from ..events import ConnectionLost
  from ..util.token import generate_jwt_token
  from .callbacks import DocumentCallbackGroup
label_desc: Use image node_id 28 for calling the ServerSession obj's underlying member method code with example usage: obj.patch(cls, message, connection) and returns: connection