code: def test_other_attrs_raise() -> None:
      d = locking.UnlockedDocumentProxy(Document())
      assert curdoc() is not d
      for attr in (set(dir(d._doc)) - set(dir(d))) | {"foo"}:
          with pytest.raises(AttributeError) as e:
              getattr(d, attr)
          assert e.value.args[0] == locking.UNSAFE_DOC_ATTR_USAGE_MSG
  
file_path: bokeh/tests/unit/bokeh/document/test_locking.py
imports: from __future__ import annotations
  import pytest
  import asyncio
  from bokeh.document.document import Document
  from bokeh.io import curdoc
  import bokeh.document.locking
label_desc: Use image node_id 2 for calling a global function with example usage: test_other_attrs_raise() without return types