code: def test_forward_nested_ref(shutdown_only):
      ray.init(object_store_memory=100 * 1024 * 1024)
  
      @ray.remote
      def nested_ref():
          return ray.put(1)
  
      @ray.remote
      def nested_nested_ref():
          return nested_ref.remote()
  
      @ray.remote
      class Borrower:
          def __init__(self):
              return
  
          def pass_ref(self, middle_ref):
              self.inner_ref = ray.get(middle_ref)
  
          def check_ref(self):
              ray.get(self.inner_ref)
  
      @ray.remote
      def pass_nested_ref(borrower, outer_ref):
          ray.get(borrower.pass_ref.remote(outer_ref[0]))
  
      b = Borrower.remote()
      outer_ref = nested_nested_ref.remote()
      x = pass_nested_ref.remote(b, [outer_ref])
      del outer_ref
      ray.get(x)
  
      for _ in range(3):
          ray.get(b.check_ref.remote())
          time.sleep(1)
  
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 15 for calling a global function with example usage: test_forward_nested_ref(shutdown_only) and returns: ray, nested_ref