code: def test_chaos_actor_retry(set_kill_interval):
      # Chaos testing.
      @ray.remote(num_cpus=0.25, max_restarts=-1, max_task_retries=-1)
      class Actor:
          def __init__(self):
              self.letter_dict = set()
  
          def add(self, letter):
              self.letter_dict.add(letter)
  
      NUM_CPUS = 16
      TOTAL_TASKS = 300
  
      pb = ProgressBar(
          "Chaos test sanity check", TOTAL_TASKS * NUM_CPUS
      )
      actors = [Actor.remote() for _ in range(NUM_CPUS)]
      results = []
      for a in actors:
          results.extend(
              [a.add.remote(str(i)) for i in range(TOTAL_TASKS)]
          )
      start = time.time()
      pb.fetch_until_complete(results)
      runtime_with_failure = time.time() - start
      print(
          f"Runtime when there are many failures: {runtime_with_failure}"
      )
      pb.close()
  
imports: import sys
  import random
  import string
  import ray
  import pytest
  import time
  from ray.experimental import shuffle
  from ray.tests.conftest import _ray_start_chaos_cluster
  from ray.data._internal.progress_bar import ProgressBar
  from ray.util.placement_group import placement_group
  from ray._private.test_utils import NodeKillerActor, get_log_message, get_and_run_resource_killer, WorkerKillerActor, wait_for_condition
  from ray.exceptions import RayTaskError, ObjectLostError
  from ray.util.state.common import ListApiOptions, StateResource
  from ray.util.state.api import StateApiClient, list_nodes
  from ray.cluster_utils import AutoscalingCluster
label_desc: Use image node_id 4 for calling a global function with example usage: test_chaos_actor_retry(set_kill_interval) without return types