def _check_banned(self):
        ip_address = get_user_ip()
        info = self._read_info(ip_address)
        if self._is_banned(info) and not self._ban_expired(info):
            logger.error(" BANNED IP BLOCKED! " + str(ip_address)
                         + " Count: " + str(info.counter)
                         + " Time left: " + str(self._ban_time_left(info)) + " s.")
            raise self.banned_http_response
        elif self._is_banned(info) and self._ban_expired(info):
            info = _reset_info()
        logger.debug("IP: %s, Time: %s Count: %s" % (ip_address, info.time, info.counter))
        return info, ip_address
Check if the ip is banned
dataset/ETHPy150Open biicode/bii-server/rest/bottle_plugins/generic_blocker_bottle_plugin.py/GenericBlockerBottlePlugin._check_banned