def to_event(self, notification_body, condenser):
        event_type = notification_body['event_type']
        message_id = notification_body['message_id']
        when = self._extract_when(notification_body)

        condenser.add_envelope_info(event_type, message_id, when)
        for t in self.traits:
            trait_info = self.traits[t].to_trait(notification_body)
            # Only accept non-None value traits ...
            if trait_info is not None:
                condenser.add_trait(*trait_info)
        return condenser
dataset/ETHPy150Open openstack/stacktach-stackdistiller/stackdistiller/distiller.py/EventDefinition.to_event/original