async def on_mqtt_packet_sent(self, *args, **kwargs):
    packet = kwargs.get('packet')
    session = kwargs.get('session', None)
    if self.context.logger.isEnabledFor(logging.DEBUG):
        if session:
            self.context.logger.debug('%s -out-> %r', session.client_id, packet)
        else:
            self.context.logger.debug('-out-> %r', packet)
async def on_mqtt_packet_sent(self, *args, **kwargs):
    packet = kwargs.get('packet')
    session = kwargs.get('session', None)
    if self.context.logger.isEnabledFor(logging.DEBUG):
        if session:
            self.context.logger.debug('%s -out-> %r', session.client_id, packet)
        else:
            self.context.logger.debug('-out-> %r', packet)