code: def test_reconstruction_chain(
      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,
          object_store_memory=10**8,
          enable_object_reconstruction=reconstruction_enabled,
      )
      ray.init(address=cluster.address)
      node_to_kill = cluster.add_node(
          num_cpus=1, object_store_memory=10**8
      )
      cluster.wait_for_nodes()
  
      @ray.remote(max_retries=1 if reconstruction_enabled else 0)
      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 x
  
      obj = large_object.remote()
      for _ in range(20):
          obj = chain.remote(obj)
      ray.get(dependent_task.remote(obj))
  
      cluster.remove_node(node_to_kill, allow_graceful=False)
      cluster.add_node(num_cpus=1, object_store_memory=10**8)
  
      if reconstruction_enabled:
          ray.get(dependent_task.remote(obj))
      else:
          with pytest.raises(ray.exceptions.RayTaskError):
              ray.get(dependent_task.remote(obj))
          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 10 for calling a global function with example usage: test_reconstruction_chain(config, ray_start_cluster, reconstruction_enabled) and returns: np, x, x