code: def handle(client_message, handle_event_member=None, handle_event_member_list=None, handle_event_member_attribute_change=None, to_object=None):
      
      message_type = client_message.get_message_type()
      if message_type == EVENT_MEMBER and handle_event_member is not None:
          member = MemberCodec.decode(client_message, to_object)
          event_type = client_message.read_int()
          handle_event_member(member=member, event_type=event_type)
      if message_type == EVENT_MEMBERLIST and handle_event_member_list is not None:
          members_size = client_message.read_int()
          members = []
          for _ in range(0, members_size):
              members_item = MemberCodec.decode(client_message, to_object)
              members.append(members_item)
          handle_event_member_list(members=members)
      if message_type == EVENT_MEMBERATTRIBUTECHANGE and handle_event_member_attribute_change is not None:
          uuid = client_message.read_str()
          key = client_message.read_str()
          operation_type = client_message.read_int()
          value = None
          if not client_message.read_bool():
              value = client_message.read_str()
          handle_event_member_attribute_change(uuid=uuid, key=key, operation_type=operation_type, value=value)
docs: Event handler