code: def test_return_object_ref(one_worker_100MiB, use_ray_put, failure):
      @ray.remote
      def return_an_id():
          return [
              put_object(
                  np.zeros(20 * 1024 * 1024, dtype=np.uint8),
                  use_ray_put,
              )
          ]
  
      @ray.remote(max_retries=1)
      def exit():
          os._exit(0)
  
      outer_oid = return_an_id.remote()
      inner_oid_binary = ray.get(outer_oid)[0].binary()
  
      # Check that taking a reference to the inner ID and removing the outer ID
      # doesn't unpin the object.
      inner_oid = ray.get(outer_oid)[0]  # noqa: F841
      del outer_oid
      _fill_object_store_and_get(inner_oid_binary)
  
      if failure:
          # Check that the owner dying unpins the object. This should execute on
          # the same worker because there is only one started and the other tasks
          # have finished.
          with pytest.raises(ray.exceptions.WorkerCrashedError):
              ray.get(exit.remote())
      else:
          # Check that removing the inner ID unpins the object.
          del inner_oid
      _fill_object_store_and_get(inner_oid_binary, succeed=False)
  
imports: import logging
  import os
  import copy
  import platform
  import random
  import signal
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray.cluster_utils
  from ray._private.internal_api import memory_summary
  from ray._private.test_utils import SignalActor, put_object, wait_for_condition, wait_for_num_actors
  import ray._private.gcs_utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_return_object_ref(one_worker_100MiB, use_ray_put, failure) and returns: list