code: def test_gather_mixup(init):
      loop = get_or_create_event_loop()
  
      @ray.remote
      def f(n):
          time.sleep(n * 0.1)
          return n, np.zeros(1024 * 1024, dtype=np.uint8)
  
      async def g(n):
          await asyncio.sleep(n * 0.1)
          return n, np.zeros(1024 * 1024, dtype=np.uint8)
  
      tasks = [
          f.remote(1).as_future(),
          g(2),
          f.remote(3).as_future(),
          g(4),
      ]
      results = loop.run_until_complete(asyncio.gather(*tasks))
      assert [result[0] for result in results] == [1, 2, 3, 4]
  
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 8 for calling a global function with example usage: test_gather_mixup(init) and returns: n,  np, n,  np