code: def test_multiple_waits_and_gets(shutdown_only):
      # It is important to use three workers here, so that the three tasks
      # launched in this experiment can run at the same time.
      ray.init(num_cpus=3)
  
      @ray.remote
      def f(delay):
          time.sleep(delay)
          return 1
  
      @ray.remote
      def g(input_list):
          # The argument input_list should be a list containing one object ref.
          ray.wait([input_list[0]])
  
      @ray.remote
      def h(input_list):
          # The argument input_list should be a list containing one object ref.
          ray.get(input_list[0])
  
      # Make sure that multiple wait requests involving the same object ref
      # all return.
      x = f.remote(1)
      ray.get([g.remote([x]), g.remote([x])])
  
      # Make sure that multiple get requests involving the same object ref all
      # return.
      x = f.remote(1)
      ray.get([h.remote([x]), h.remote([x])])
  
imports: import json
  import logging
  import os
  import sys
  import time
  import numpy
  import pytest
  import ray._private.profiling
  import ray.cluster_utils
  from ray._private.internal_api import memory_summary
  from ray._private.test_utils import client_test_enabled, wait_for_condition
  from ray.exceptions import ObjectFreedError
label_desc: Use image node_id 4 for calling a global function with example usage: test_multiple_waits_and_gets(shutdown_only) and returns: int