code: def test_generator_dist_gather(ray_start_cluster):
      cluster = ray_start_cluster
      cluster.add_node(
          num_cpus=0, object_store_memory=1 * 1024 * 1024 * 1024
      )
      ray.init()
      cluster.add_node(num_cpus=1)
      cluster.add_node(num_cpus=1)
      cluster.add_node(num_cpus=1)
      cluster.add_node(num_cpus=1)
  
      @ray.remote(num_cpus=1)
      class Actor:
          def __init__(self, child=None):
              self.child = child
  
          def get_data(self):
              for _ in range(10):
                  time.sleep(0.1)
                  yield np.ones(5 * 1024 * 1024)
  
      async def all_gather():
          actor = Actor.remote()
          async for ref in actor.get_data.remote():
              val = await ref
              assert np.array_equal(np.ones(5 * 1024 * 1024), val)
              del ref
  
      async def main():
          await asyncio.gather(
              all_gather(), all_gather(), all_gather(), all_gather()
          )
  
      asyncio.run(main())
      summary = ray._private.internal_api.memory_summary(
          stats_only=True
      )
      print(summary)
  
imports: import asyncio
  import pytest
  import numpy
  import sys
  import time
  from collections import Counter
  from starlette.responses import StreamingResponse
  from starlette.requests import Request
  from fastapi import FastAPI
  from ray import serve
  from pydantic import BaseModel
  import ray
  from ray._raylet import ObjectRefGenerator
  from ray.exceptions import WorkerCrashedError
  from ray._private.test_utils import run_string_as_driver_nonblocking
  from ray.util.state import list_actors
label_desc: Use image node_id 2 for calling a global function with example usage: test_generator_dist_gather(ray_start_cluster) without return types