code: def test_without_document_lock_accepts_async_function() -> None:
      i = 0
      d = Document()
  
      @locking.without_document_lock
      async def cb():
          nonlocal i
          await asyncio.sleep(0.1)
          i += 1
  
      callback_obj = d.add_next_tick_callback(cb)
  
      loop = asyncio.get_event_loop()
      loop.run_until_complete(callback_obj.callback())
  
      assert callback_obj.callback.nolock is True
      assert i == 1
  
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 4 for calling a global function with example usage: test_without_document_lock_accepts_async_function() without return types