code: def test_scatter_gather_dag(ray_start_regular, num_actors):
      actors = [Actor.remote(0) for _ in range(num_actors)]
      with InputNode() as i:
          out = [a.inc.bind(i) for a in actors]
          dag = MultiOutputNode(out)
  
      compiled_dag = dag.experimental_compile()
  
      for i in range(3):
          output_channels = compiled_dag.execute(1)
          # TODO(swang): Replace with fake ObjectRef.
          results = [chan.begin_read() for chan in output_channels]
          assert results == [i + 1] * num_actors
          for chan in output_channels:
              chan.end_read()
  
      compiled_dag.teardown()
  
imports: import logging
  import os
  import random
  import sys
  import time
  import pytest
  import ray
  import ray.cluster_utils
  from ray.exceptions import RaySystemError
  from ray.dag import InputNode, MultiOutputNode
  from ray.tests.conftest import *
label_desc: Use image node_id 3 for calling a global function with example usage: test_scatter_gather_dag(ray_start_regular, num_actors) without return types