code: def test_curstate() -> None:
      cs = bis.curstate()
      assert cs is bis._STATE
      print(bis.State)
      assert isinstance(cs, bis.State)
      cs2 = bis.curstate()
      assert cs is cs2
  
      old_STATE = bis._STATE
      bis._STATE = None
      cs3 = bis.curstate()
      assert cs3 is bis._STATE
      assert isinstance(cs3, bis.State)
      assert cs3 is not cs2
      bis._STATE = old_STATE
  
file_path: bokeh/tests/unit/bokeh/io/test_state.py
imports: from __future__ import annotations
  import pytest
  from unittest.mock import MagicMock, patch
  from bokeh.document import Document
  import bokeh.io.state
label_desc: Use image node_id 1 for calling a global function with example usage: test_curstate() without return types