code: def test_return_nested_ids(shutdown_only, inline_args):
      config = dict()
      if inline_args:
          config["max_direct_call_object_size"] = 100 * 1024 * 1024
      else:
          config["max_direct_call_object_size"] = 0
      ray.init(
          object_store_memory=100 * 1024 * 1024, _system_config=config
      )
  
      class Nested:
          def __init__(self, blocks):
              self._blocks = blocks
  
      @ray.remote
      def echo(fn):
          return fn()
  
      @ray.remote
      def create_nested():
          refs = [
              ray.put(np.random.random(1024 * 1024)) for _ in range(10)
          ]
          return Nested(refs)
  
      @ray.remote
      def test():
          ref = create_nested.remote()
          result1 = ray.get(ref)
          del ref
          result = echo.remote(lambda: result1)  # noqa
          del result1
  
          time.sleep(5)
          block = ray.get(result)._blocks[0]
          print(ray.get(block))
  
      ray.get(test.remote())
  
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 12 for calling a global function with example usage: test_return_nested_ids(shutdown_only, inline_args) and returns: fn, Nested