code: def _set_cooldown_period(self, current_time):
      if (
          self._cooldown_lower_limit == -1
          or self._cooldown_upper_limit == -1
      ):
          return
      self._blacklist_count += 1
  
      cooldown_delay = self._cooldown_lower_limit * (
          1 << self._blacklist_count
      ) + (random.uniform(0, 1) * self._cooldown_lower_limit)
      logging.debug(
          f"{self._blacklist_count}:{self._cooldown_period_end_ts} cooldown_delay: {cooldown_delay}"
      )
      # We need to ensure that the cooldown upper limit is the upper bound of the delay
      cooldown_delta_seconds = max(
          self._cooldown_lower_limit,
          min(self._cooldown_upper_limit, cooldown_delay),
      )
  
      self._cooldown_period_end_ts = (
          current_time + cooldown_delta_seconds
      )
      logging.debug(f"cooldown delta seconds: {cooldown_delta_seconds}")
  
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 6 for calling the HostState obj's underlying member method code with example usage: obj._set_cooldown_period(current_time) without return types