code: def test_multiple_objects(ray_start_cluster):
      cluster_node_config = [
          {"num_cpus": 1, "resources": {f"node{i+1}": 10}}
          for i in range(3)
      ]
      cluster = ray_start_cluster
      for kwargs in cluster_node_config:
          cluster.add_node(**kwargs)
      ray.init(address=cluster.address)
  
      OBJECT_NUMBER = 1000
  
      @ray.remote(resources={"node1": 1}, num_cpus=0)
      class Creator:
          def gen_object_refs(self, owner):
              refs = []
              for _ in range(OBJECT_NUMBER):
                  refs.append(
                      ray.put(np.random.rand(2, 2), _owner=owner)
                  )
              ray.get(owner.set_object_refs.remote(refs))
  
      @ray.remote(resources={"node2": 1}, num_cpus=0)
      class Owner:
          def __init__(self):
              self.refs = None
  
          def set_object_refs(self, refs):
              self.refs = refs
  
          def warmup(self):
              return 0
  
          def remote_get_object_refs(self, worker):
              return ray.get(worker.get_objects.remote(self.refs))
  
      @ray.remote(resources={"node3": 1}, num_cpus=0)
      class Borrower:
          def get_objects(self, refs):
              for ref in refs:
                  ray.get(ref)
              return True
  
      owner = Owner.remote()
      creator = Creator.remote()
      borrower = Borrower.remote()
  
      # Make sure the owner actor is alive.
      ray.get(owner.warmup.remote())
  
      ray.get(creator.gen_object_refs.remote(owner))
  
      ray.kill(creator)
  
      assert ray.get(
          owner.remote_get_object_refs.remote(borrower), timeout=60
      )
  
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 3 for calling a global function with example usage: test_multiple_objects(ray_start_cluster) and returns: int, ray, True