code: def main():
      """Start the chaos testing.
  
      Currently chaos testing only covers random node failures.
      """
      args, _ = parse_script_args()
      ray.init(address="auto")
      if args.kill_workers:
          resource_killer_cls = WorkerKillerActor
          kill_filter_fn = task_filter(args.task_names)
      else:
          resource_killer_cls = NodeKillerActor
          kill_filter_fn = task_node_filter(args.task_names)
  
      get_and_run_resource_killer(
          resource_killer_cls,
          args.kill_interval,
          namespace="release_test_namespace",
          lifetime="detached",
          no_start=args.no_start,
          max_to_kill=args.max_to_kill,
          kill_delay_s=args.kill_delay,
          kill_filter_fn=kill_filter_fn,
      )
      print(
          f"Successfully deployed a {'worker' if args.kill_workers else 'node'} killer."
      )
  
file_path: ray/release/nightly_tests/setup_chaos.py
imports: import argparse
  from ray.util.state.api import StateApiClient
  from ray.util.state.common import ListApiOptions, StateResource
  import ray
  from ray._private.test_utils import get_and_run_resource_killer, NodeKillerActor, WorkerKillerActor
label_desc: Use image node_id 4 for calling a global function with example usage: main() without return types