code: def test_gather(init):
      loop = get_or_create_event_loop()
      tasks = gen_tasks()
      futures = [obj_ref.as_future() for obj_ref in tasks]
      results = loop.run_until_complete(asyncio.gather(*futures))
      assert all(a[0] == b[0] for a, b in zip(results, ray.get(tasks)))
  
imports: import asyncio
  import concurrent.futures
  import sys
  import time
  import numpy
  import pytest
  import ray
  from ray._private.async_compat import is_async_func
  from ray._private.test_utils import wait_for_condition
  from ray._private.utils import get_or_create_event_loop, run_background_task, background_tasks
label_desc: Use image node_id 5 for calling a global function with example usage: test_gather(init) without return types