code: def test_fork(setup_queue_actor):
      queue = setup_queue_actor
  
      @ray.remote
      def fork(queue, key, item):
          # ray.get here could be blocked and cause ray to start
          # a lot of python workers.
          return ray.get(queue.enqueue.remote(key, item))
  
      # Fork num_iters times.
      num_iters = 100
      ray.get([fork.remote(queue, i, 0) for i in range(num_iters)])
      items = ray.get(queue.read.remote())
      for i in range(num_iters):
          filtered_items = [item[1] for item in items if item[0] == i]
          assert filtered_items == list(range(1))
  
imports: import os
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray._private.gcs_utils
  from ray.util.state import list_actors
  import ray.cluster_utils
  from ray._private.test_utils import SignalActor, convert_actor_state, kill_actor_and_wait_for_failure, make_global_state_accessor, run_string_as_driver, wait_for_condition, wait_for_pid_to_exit
  from ray._private.ray_constants import gcs_actor_scheduling_enabled
  from ray.experimental.internal_kv import _internal_kv_get, _internal_kv_put
label_desc: Use image node_id 10 for calling a global function with example usage: test_fork(setup_queue_actor) and returns: ray