def process_event(self, event, can_nak=True):
        def handle_valid(status):
            log.debug("Event accepted; sending ACK to %s" % (self.transport.getPeer()))
            self.send_xml(
                ack(self.factory.local_ivo, event.element.attrib['ivorn'])
            )
            self.handle_event(event).addCallbacks(
                lambda x: log.debug("Event processed"),
                lambda x: log.warn("Event handlers failed")
            )

        def handle_invalid(failure):
            log.info("Event rejected (%s); discarding" % (failure.value.subFailure.getErrorMessage(),))
            if can_nak:
                log.debug("Sending NAK to %s" % (self.transport.getPeer()))
                self.send_xml(
                    nak(
                        self.factory.local_ivo, event.element.attrib['ivorn'],
                        "Event rejected: %s" % (failure.value.subFailure.getErrorMessage(),)
                    )
                )
            else:
                log.debug("Sending ACK to %s" % (self.transport.getPeer()))
                self.send_xml(
                    ack(self.factory.local_ivo, event.element.attrib['ivorn'])
                )
        return self.validate_event(event).addCallbacks(handle_valid, handle_invalid)
Special function for printing description in column format
dataset/ETHPy150Open jdswinbank/Comet/comet/protocol/base.py/EventHandler.process_event--crossover with--dataset/ETHPy150Open staranjeet/github-trending-cli/githubtrending/helpers.py/print_each_description