code: def test_owner_assign_inner_object(shutdown_only):
      ray.init()
  
      @ray.remote
      class Owner:
          def warmup(self):
              pass
  
      @ray.remote
      def get_borrowed_object():
          ref = ray.put(("test_borrowed"))
          return [ref]
  
      owner = Owner.remote()
      ray.get(owner.warmup.remote())
  
      class OutObject:
          def __init__(self, owned_inner_ref, borrowed_inner_ref):
              self.owned_inner_ref = owned_inner_ref
              self.borrowed_inner_ref = borrowed_inner_ref
  
      owned_inner_ref = ray.put("test_owned")
  
      borrowed_inner_ref = ray.get(get_borrowed_object.remote())[0]
      out_ref = ray.put(
          OutObject(owned_inner_ref, borrowed_inner_ref), _owner=owner
      )
  
      # wait enough time to delete data when the reference count is lower
      # than expected
      del owned_inner_ref, borrowed_inner_ref
      time.sleep(10)
  
      assert ray.get(ray.get(out_ref).owned_inner_ref) == "test_owned"
      assert (
          ray.get(ray.get(out_ref).borrowed_inner_ref)
          == "test_borrowed"
      )
  
file_path: ray/python/ray/tests/test_object_assign_owner.py
imports: import pytest
  import ray
  import time
  import numpy
  import os
  from ray._private.test_utils import skip_flaky_core_test_premerge
  from ray.exceptions import OwnerDiedError
label_desc: Use image node_id 4 for calling a global function with example usage: test_owner_assign_inner_object(shutdown_only) and returns: list