code: def test_recursively_return_borrowed_object_ref(
      one_worker_100MiB, use_ray_put, failure
  ):
      @ray.remote
      def recursive(num_tasks_left):
          if num_tasks_left == 0:
              return (
                  put_object(
                      np.zeros(20 * 1024 * 1024, dtype=np.uint8),
                      use_ray_put,
                  ),
                  os.getpid(),
              )
  
          return ray.get(recursive.remote(num_tasks_left - 1))
  
      max_depth = 5
      head_oid = recursive.remote(max_depth)
      final_oid, owner_pid = ray.get(head_oid)
      final_oid_bytes = final_oid.binary()
  
      # Check that the driver's reference pins the object.
      _fill_object_store_and_get(final_oid_bytes)
  
      # Remove the local reference and try it again.
      _fill_object_store_and_get(final_oid_bytes)
  
      if failure:
          os.kill(owner_pid, SIGKILL)
      else:
          # Remove all references.
          del head_oid
          del final_oid
  
      # Reference should be gone, check that returned ID gets evicted.
      _fill_object_store_and_get(final_oid_bytes, succeed=False)
  
      if failure:
          with pytest.raises(ray.exceptions.OwnerDiedError):
              ray.get(final_oid)
  
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 7 for calling a global function with example usage: test_recursively_return_borrowed_object_ref(one_worker_100MiB, use_ray_put, failure) and returns: ray, put_object,  os