code: def test_release_resources_race(shutdown_only):
      # This test fails with the flag set to false.
      ray.init(
          num_cpus=2,
          object_store_memory=700e6,
          _system_config={"inline_object_status_in_refs": True},
      )
      refs = []
      for _ in range(10):
          refs.append(ray.put(bytearray(20 * 1024 * 1024)))
  
      @ray.remote
      def consume(refs):
          # Should work without releasing resources!
          ray.get(refs)
          return os.getpid()
  
      pids = set(ray.get([consume.remote(refs) for _ in range(1000)]))
      # Should not have started multiple workers.
      assert len(pids) <= 2, pids
  
imports: import logging
  import os
  import pickle
  import random
  import sys
  import time
  import pytest
  import ray
  import ray.cluster_utils
  from ray._private.test_utils import SignalActor, client_test_enabled, get_error_message, run_string_as_driver
label_desc: Use image node_id 2 for calling a global function with example usage: test_release_resources_race(shutdown_only) and returns: os