code: def _handle_packet(self, packet):
          
          events = packet_events(packet)
  
          for event in events:
              if self.ignore_event(event['id']):
                  log.debug('ignoring event with id: %s', event)
                  continue
              log.debug('got event: %s', event)
              if self.event_callback:
                  self.event_callback(event)
              else:
                  self.handle_event(event)
docs: Event specific packet handling logic.
  
          Break packet into events and fires configured event callback or
          nicely prints events for console.