code: def test_set_curdoc_sets_curstate() -> None:
      d = Document()
      bid.set_curdoc(d)
      assert curstate().document is d
  
file_path: bokeh/tests/unit/bokeh/io/test_doc.py
imports: from __future__ import annotations
  import pytest
  import weakref
  from bokeh.document import Document
  from bokeh.io.state import curstate
  import bokeh.io.doc
label_desc: Use image node_id 2 for calling a global function with example usage: test_set_curdoc_sets_curstate() without return types