code: def on_down(self, host, is_host_addition, expect_host_to_be_down=False):
          
          if self.is_shutdown:
              return
  
          with host.lock:
              was_up = host.is_up
  
              # ignore down signals if we have open pools to the host
              # this is to avoid closing pools when a control connection host became isolated
              if self._discount_down_events and self.profile_manager.distance(host) != HostDistance.IGNORED:
                  connected = False
                  for session in tuple(self.sessions):
                      pool_states = session.get_pool_state()
                      pool_state = pool_states.get(host)
                      if pool_state:
                          connected |= pool_state['open_count'] > 0
                  if connected:
                      return
  
              host.set_down()
              if (not was_up and not expect_host_to_be_down) or host.is_currently_reconnecting():
                  return
  
          log.warning("Host %s has been marked down", host)
  
          self.profile_manager.on_down(host)
          self.control_connection.on_down(host)
          for session in tuple(self.sessions):
              session.on_down(host)
  
          for listener in self.listeners:
              listener.on_down(host)
  
          self._start_reconnector(host, is_host_addition)
docs: Intended for internal use only.