code: def test_concurrent_future_many(ray_start_regular_shared):
      @ray.remote
      def task(i):
          return i
  
      refs = [task.remote(i) for i in range(100)]
      futs = [ref.future() for ref in refs]
      result = set()
  
      for fut in concurrent.futures.as_completed(futs):
          assert fut.done()
          result.add(fut.result())
      assert result == set(range(100))
  
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 11 for calling a global function with example usage: test_concurrent_future_many(ray_start_regular_shared) and returns: i