def handle(client_message, handle_event_entry=None, to_object=None):
message_type = client_message.get_message_type()<EOL>if message_type == EVENT_ENTRY and handle_event_entry is not None:<EOL><INDENT>key = None<EOL>if not client_message.read_bool():<EOL><INDENT>key = client_message.read_data()<EOL><DEDENT>value = None<EOL>if not client_message.read_bool():<EOL><INDENT>value = client_message.read_data()<EOL><DEDENT>old_value = None<EOL>if not client_message.read_bool():<EOL><INDENT>old_value = client_message.read_data()<EOL><DEDENT>merging_value = None<EOL>if not client_message.read_bool():<EOL><INDENT>merging_value = client_message.read_data()<EOL><DEDENT>event_type = client_message.read_int()<EOL>uuid = client_message.read_str()<EOL>number_of_affected_entries = client_message.read_int()<EOL>handle_event_entry(key=key, value=value, old_value=old_value, merging_value=merging_value, event_type=event_type, uuid=uuid, number_of_affected_entries=number_of_affected_entries)<EOL><DEDENT>
Event handler