class AddEventFunctionality:

    @classmethod
    def retrieve_events(cls, events) -> list[tuple[int, str]]:
        from databases import Events

        get_event_ids = Events.filter_all(
            Events.function_code.in_([event["function_code"] for event in events]),
            system=True,
        ).data
        if get_event_ids:
            return [(get_event.id, str(get_event.uu_id)) for get_event in get_event_ids]
        else:
            raise Exception("No event found")
