code: def create_instance_killer(
      probability: float = 0.1,
      time_between_checks_s: float = 60,
      warmup_time_s: float = 0,
  ):
      killer_actor_cls = InstanceKillerActor.options(
          scheduling_strategy=NodeAffinitySchedulingStrategy(
              ray.get_runtime_context().get_node_id(), soft=False
          ),
      )
      actor = killer_actor_cls.remote(
          probability=probability,
          time_between_checks_s=time_between_checks_s,
          warmup_time_s=warmup_time_s,
      )
      return actor
  
file_path: ray/release/tune_tests/fault_tolerance_tests/workloads/terminate_node_aws.py
imports: import subprocess
  import random
  import requests
  import time
  import logging
  import ray
  from ray.util.scheduling_strategies import NodeAffinitySchedulingStrategy
  from ray._private.test_utils import safe_write_to_results_json
label_desc: Use image node_id 4 for calling a global function with example usage: create_instance_killer(probability, time_between_checks_s, warmup_time_s) and returns: actor