code: def test_multiple_downstream_tasks(
      config, ray_start_cluster, reconstruction_enabled
  ):
      # Workaround to reset the config to the default value.
      if not reconstruction_enabled:
          config["lineage_pinning_enabled"] = False
  
      cluster = ray_start_cluster
      # Head node with no resources.
      cluster.add_node(
          num_cpus=0,
          _system_config=config,
          enable_object_reconstruction=reconstruction_enabled,
      )
      ray.init(address=cluster.address)
      # Node to place the initial object.
      node_to_kill = cluster.add_node(
          num_cpus=1,
          resources={"node1": 1},
          object_store_memory=10**8,
      )
      cluster.add_node(
          num_cpus=1,
          resources={"node2": 1},
          object_store_memory=10**8,
      )
      cluster.wait_for_nodes()
  
      @ray.remote
      def large_object():
          return np.zeros(10**7, dtype=np.uint8)
  
      @ray.remote
      def chain(x):
          return x
  
      @ray.remote
      def dependent_task(x):
          return
  
      obj = large_object.options(resources={"node2": 1}).remote()
      downstream = [
          chain.options(resources={"node1": 1}).remote(obj)
          for _ in range(4)
      ]
      for obj in downstream:
          ray.get(
              dependent_task.options(resources={"node1": 1}).remote(obj)
          )
  
      cluster.remove_node(node_to_kill, allow_graceful=False)
      node_to_kill = cluster.add_node(
          num_cpus=1,
          resources={"node1": 1},
          object_store_memory=10**8,
      )
  
      if reconstruction_enabled:
          for obj in downstream:
              ray.get(
                  dependent_task.options(resources={"node1": 1}).remote(
                      obj
                  )
              )
      else:
          with pytest.raises(ray.exceptions.RayTaskError):
              for obj in downstream:
                  ray.get(
                      dependent_task.options(
                          resources={"node1": 1}
                      ).remote(obj)
                  )
          with pytest.raises(ray.exceptions.ObjectLostError):
              ray.get(obj)
  
      cluster.remove_node(node_to_kill, allow_graceful=False)
      cluster.add_node(
          num_cpus=1,
          resources={"node1": 1},
          object_store_memory=10**8,
      )
  
      if reconstruction_enabled:
          for obj in downstream:
              ray.get(
                  dependent_task.options(resources={"node1": 1}).remote(
                      obj
                  )
              )
      else:
          for obj in downstream:
              with pytest.raises(ray.exceptions.ObjectLostError):
                  ray.get(obj)
  
file_path: ray/python/ray/tests/test_reconstruction.py
imports: import os
  import signal
  import sys
  import time
  import numpy
  import pytest
  import ray
  from ray._private.test_utils import wait_for_condition, wait_for_pid_to_exit
label_desc: Use image node_id 9 for calling a global function with example usage: test_multiple_downstream_tasks(config, ray_start_cluster, reconstruction_enabled) and returns: np, x