code: def test_event_as_workflow(workflow_start_regular_shared):
      class MyEventListener(workflow.EventListener):
          async def poll_for_event(self):
              while not utils.check_global_mark():
                  await asyncio.sleep(1)
  
      utils.unset_global_mark()
      promise = workflow.run_async(
          workflow.wait_for_event(MyEventListener), workflow_id="wf"
      )
  
      assert (
          workflow.get_status("wf") == workflow.WorkflowStatus.RUNNING
      )
  
      utils.set_global_mark()
      assert ray.get(promise) is None
  
file_path: ray/python/ray/workflow/tests/test_events.py
imports: import asyncio
  import time
  import pytest
  import ray
  from ray import workflow
  from ray.tests.conftest import *
  from ray.workflow.tests import utils
label_desc: Use image node_id 6 for calling a global function with example usage: test_event_as_workflow(workflow_start_regular_shared) without return types