code: async def _receive_packet(self, pkt):
          
          packet_name = packet.packet_names[pkt.packet_type] \
              if pkt.packet_type < len(packet.packet_names) else 'UNKNOWN'
          self.logger.info(
              'Received packet %s data %s', packet_name,
              pkt.data if not isinstance(pkt.data, bytes) else '<binary>')
          if pkt.packet_type == packet.MESSAGE:
              await self._trigger_event('message', pkt.data, run_async=True)
          elif pkt.packet_type == packet.PONG:
              self.pong_received = True
          elif pkt.packet_type == packet.NOOP:
              pass
          else:
              self.logger.error('Received unexpected packet of type %s',
                                pkt.packet_type)
docs: Handle incoming packets from the server.