code: def test_ensure_async():
      async def main():
          assert await ensure_async(afunc()) == "afunc"
          assert await ensure_async(func()) == "func"
  
      asyncio.run(main())
  
file_path: jupyter_core/tests/test_utils.py
imports: from __future__ import annotations
  import asyncio
  import os
  import tempfile
  import pytest
  from jupyter_core.utils import deprecation, ensure_async, ensure_dir_exists, ensure_event_loop, run_sync
label_desc: Use image node_id 5 for calling a global function with example usage: test_ensure_async() without return types