code: def test_spilled(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.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 dependent_task(x):
          return
  
      obj = large_object.options(resources={"node1": 1}).remote()
      ray.get(
          dependent_task.options(resources={"node1": 1}).remote(obj)
      )
      # Force spilling.
      objs = [
          large_object.options(resources={"node1": 1}).remote()
          for _ in range(20)
      ]
      for o in objs:
          ray.get(o)
  
      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:
          ray.get(dependent_task.remote(obj), timeout=60)
      else:
          with pytest.raises(ray.exceptions.RayTaskError):
              ray.get(dependent_task.remote(obj), timeout=60)
          with pytest.raises(ray.exceptions.ObjectLostError):
              ray.get(obj, timeout=60)
  
file_path: ray/python/ray/tests/test_reconstruction_2.py
imports: import os
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray._private.ray_constants
  from ray._private.internal_api import memory_summary
  from ray._private.test_utils import Semaphore, SignalActor, wait_for_condition
label_desc: Use image node_id 7 for calling a global function with example usage: test_spilled(config, ray_start_cluster, reconstruction_enabled) and returns: np