code: def test_object_directory_failure(ray_start_cluster):
      cluster = ray_start_cluster
      config = {
          "health_check_initial_delay_ms": 0,
          "health_check_period_ms": 500,
          "health_check_failure_threshold": 10,
          "object_timeout_milliseconds": 200,
      }
  
      # Add a head node.
      cluster.add_node(_system_config=config)
      ray.init(address=cluster.address)
  
      # Add worker nodes.
      num_nodes = 5
      for i in range(num_nodes):
          cluster.add_node(resources={str(i): 100})
  
      # Add a node to be removed
      index_killing_node = num_nodes
      node_to_kill = cluster.add_node(
          resources={str(index_killing_node): 100},
          object_store_memory=10**9,
      )
  
      @ray.remote
      class ObjectHolder:
          def __init__(self):
              self.x = ray.put(np.zeros(1024 * 1024, dtype=np.uint8))
  
          def get_obj(self):
              return [self.x]
  
          def ready(self):
              return True
  
      oh = ObjectHolder.options(
          num_cpus=0.01, resources={str(index_killing_node): 1}
      ).remote()
      obj = ray.get(oh.get_obj.remote())[0]
  
      @ray.remote
      def task(x):
          pass
  
      cluster.remove_node(node_to_kill, allow_graceful=False)
      tasks = []
      repeat = 3
      for i in range(num_nodes):
          for _ in range(repeat):
              tasks.append(
                  task.options(resources={str(i): 1}).remote(obj)
              )
  
      for t in tasks:
          with pytest.raises(ray.exceptions.RayTaskError):
              ray.get(t, timeout=10)
  
imports: import multiprocessing
  import time
  import warnings
  from collections import defaultdict
  import numpy
  import pytest
  import ray
  from ray.cluster_utils import Cluster, cluster_not_supported
  from ray.util.scheduling_strategies import NodeAffinitySchedulingStrategy
label_desc: Use image node_id 15 for calling a global function with example usage: test_object_directory_failure(ray_start_cluster) and returns: list, True