code: def __init__(self, cooldown_range=None):
      self._event = threading.Event()
  
      self._blacklisted = False
      self._blacklist_count = 0
      if cooldown_range:
          HostState._validate_cooldown_range(cooldown_range)
          (
              self._cooldown_lower_limit,
              self._cooldown_upper_limit,
          ) = cooldown_range
      else:
          self._cooldown_lower_limit = -1
          self._cooldown_upper_limit = -1
      self._cooldown_period_end_ts = 0
  
imports: import io
  import logging
  import random
  import threading
  import time
  from collections import defaultdict
  from horovod.runner.common.util import safe_shell_exec
  from horovod.runner.elastic.worker import HostUpdateResult
label_desc: Use image node_id 1 to create a new HostState object from inherited base classes: object with example: obj = HostState(cooldown_range)