code: def test_object_broadcast():
      assert num_alive_nodes() == NUM_NODES
  
      @ray.remote(num_cpus=1, resources={"node": 1})
      class Actor:
          def foo(self):
              pass
  
          def data_len(self, arr):
              return len(arr)
  
      actors = [Actor.remote() for _ in range(NUM_NODES)]
  
      arr = np.ones(OBJECT_SIZE, dtype=np.uint8)
      ref = ray.put(arr)
  
      for actor in tqdm(actors, desc="Ensure all actors have started."):
          ray.get(actor.foo.remote())
  
      start = perf_counter()
      result_refs = []
      for actor in tqdm(actors, desc="Broadcasting objects"):
          result_refs.append(actor.data_len.remote(ref))
  
      results = ray.get(result_refs)
      end = perf_counter()
  
      for result in results:
          assert result == OBJECT_SIZE
  
      return end - start
  
file_path: ray/release/benchmarks/object_store/test_object_store.py
imports: import numpy
  import ray
  import ray.autoscaler.sdk
  import json
  import os
  from time import perf_counter
  from tqdm import tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: test_object_broadcast() and returns: unknown, len