class_docstr: Wrap a Document object so that only methods that can safely be used
  from unlocked callbacks or threads are exposed. Attempts to otherwise
  access or change the Document results in an exception.
class_docstr_tok: ["Wrap","a","Document","object","so","that","only","methods","that","can","safely","be","used","from","unlocked","callbacks","or","threads","are","exposed",".","Attempts","to","otherwise","access","or","change","the","Document","results","in","an","exception","."]
docstr_tok: []
code: def __init__(self, doc: Document) -> None:
      """ """
      self._doc = doc
  
file_path: bokeh/src/bokeh/document/locking.py
imports: from __future__ import annotations
  import logging
  import asyncio
  from functools import wraps
  from typing import TYPE_CHECKING, Any, Callable, Literal, Protocol, TypeVar, cast
label_desc: Use image node_id 1 to create a new UnlockedDocumentProxy object  with example: obj = UnlockedDocumentProxy(doc)