def METHOD_NAME(self):
    logger.debug(
        "_maybe_failover: unexpected disconnects: %d",
        self._unexpected_disconnects,
    )
    self._unhealthy_timer_handle = None
    if (
        self._unexpected_disconnects / self._pgcon_count
        >= UNEXPECTED_DISCONNECTS_THRESHOLD
    ) and not self._sys_pgcon_healthy:
        self.set_state_failover()