def process_packet(self, packet):
packet_type = packet['<STR_LIT:type>']<EOL>if packet_type == '<STR_LIT>':<EOL><INDENT>return self.process_event(packet)<EOL><DEDENT>elif packet_type == '<STR_LIT:message>':<EOL><INDENT>return self.call_method_with_acl('<STR_LIT>', packet,<EOL>packet['<STR_LIT:data>'])<EOL><DEDENT>elif packet_type == '<STR_LIT>':<EOL><INDENT>return self.call_method_with_acl('<STR_LIT>', packet,<EOL>packet['<STR_LIT:data>'])<EOL><DEDENT>elif packet_type == '<STR_LIT>':<EOL><INDENT>self.socket.send_packet(packet)<EOL>return self.call_method_with_acl('<STR_LIT>', packet)<EOL><DEDENT>elif packet_type == '<STR_LIT:error>':<EOL><INDENT>return self.call_method_with_acl('<STR_LIT>', packet)<EOL><DEDENT>elif packet_type == '<STR_LIT>':<EOL><INDENT>callback = self.socket._pop_ack_callback(packet['<STR_LIT>'])<EOL>if not callback:<EOL><INDENT>print("<STR_LIT>" % packet['<STR_LIT>'])<EOL>return<EOL><DEDENT>return callback(*(packet['<STR_LIT:args>']))<EOL><DEDENT>elif packet_type == '<STR_LIT>':<EOL><INDENT>return self.call_method_with_acl('<STR_LIT>', packet)<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>", packet)<EOL><DEDENT>
If you override this, NONE of the functions in this class
        will be called.  It is responsible for dispatching to
        :meth:`process_event` (which in turn calls ``on_*()`` and
        ``recv_*()`` methods).

        If the packet arrived here, it is because it belongs to this endpoint.

        For each packet arriving, the only possible path of execution, that is,
        the only methods that *can* be called are the following:

        * recv_connect()
        * recv_message()
        * recv_json()
        * recv_error()
        * recv_disconnect()
        * on_*()