def _sanitize_entity(self, entity):
        aliases = {
            "current_state": "state",
            "is_flapping": "flapping",
            "scheduled_downtime_depth": "in_downtime",
            "has_been_checked": "checked",
            "should_be_scheduled": "scheduled",
            "active_checks_enabled": "active_checks",
            "passive_checks_enabled": "passive_checks",
            }
        sane = {}
        for akey in aliases.keys():
            sane[aliases[akey]] = None

        aliases_keys = aliases.keys()
        for key in entity.keys():
            if key not in aliases_keys:
                continue

            alias = aliases[key]
            try:
                sane[alias] = int(entity[key])
            except Exception:
                sane[alias] = None

        if sane["active_checks"] not in [0, 1]:
            sane["active_checks"] = 0
        elif sane["active_checks"] == 1:
            sane["passive_checks"] = 0

        if sane["passive_checks"] not in [0, 1]:
            sane["passive_checks"] = 0

        return sane
Close all pooled connections and disable the pool.
dataset/ETHPy150Open Yelp/fullerite/src/diamond/collectors/icinga_stats/icinga_stats.py/IcingaStatsCollector._sanitize_entity--crossover with--dataset/ETHPy150Open kennethreitz/requests/requests/packages/urllib3/connectionpool.py/HTTPConnectionPool.close