code: def handle(client_message, handle_event_item=None, to_object=None):
      
      message_type = client_message.get_message_type()
      if message_type == EVENT_ITEM and handle_event_item is not None:
          item = None
          if not client_message.read_bool():
              item = client_message.read_data()
          uuid = client_message.read_str()
          event_type = client_message.read_int()
          handle_event_item(item=item, uuid=uuid, event_type=event_type)
docs: Event handler