def create_alerts(self, event_types: List[str], callback_args=None):
    if (callback_args is None):
        callback_args = []
    ret = []
    for e in self.events:
        types = EVENTS[e].keys()
        for et in event_types:
            if (et in types):
                alert = EVENTS[e][et]
                if (not isinstance(alert, Alert)):
                    alert = alert(*callback_args)
                if ((DT_CTRL * (self.events_prev[e] + 1)) >= alert.creation_delay):
                    alert.alert_type = f'{EVENT_NAME[e]}/{et}'
                    alert.event_type = et
                    ret.append(alert)
    return ret
def create_alerts(self, event_types: List[str], callback_args=None):
    if (callback_args is None):
        callback_args = []
    ret = []
    for e in self.events:
        types = EVENTS[e].keys()
        for et in event_types:
            if (et in types):
                alert = EVENTS[e][et]
                if (not isinstance(alert, Alert)):
                    alert = alert(*callback_args)
                if ((DT_CTRL * (self.events_prev[e] + 1)) >= alert.creation_delay):
                    alert.alert_type = f'{EVENT_NAME[e]}/{et}'
                    alert.event_type = et
                    ret.append(alert)
    return ret