@idiokit.stream
    def _normalize(self):
        while True:
            event = yield idiokit.next()
            event.add("feed", "autoshun")
            event.add("feed url", self.feed_url)
            event.add("description", "This host has triggered an IDS alert.")

            for info in event.values("info"):
                for name, tuples in CLASSIFICATION.items():
                    if info.startswith(name):
                        for pair in tuples:
                            event.add(pair[0], pair[1])
                event.add("autoshun classification", info)
            event.clear("info")
            if not event.contains("type"):
                event.add("type", "ids alert")
            times = event.values("time")
            for time in times:
                try:
                    event.add("source time", self._normalize_time(time))
                except __HOLE__:
                    event.add("source time", self._normalize_date(time))
            event.clear("time")
            yield idiokit.send(event)
dataset/ETHPy150Open abusesa/abusehelper/abusehelper/bots/autoshun/autoshunbot.py/AutoshunBot._normalize