Decode response from client message

def decode_response(client_message, to_object=None):
    """ Decode response from client message"""
    parameters = dict(value=None, replica_timestamps=None, replica_count=None)
    parameters['value'] = client_message.read_long()

    replica_timestamps_size = client_message.read_int()
    replica_timestamps = []
    for _ in range(0, replica_timestamps_size):
        replica_timestamps_item = (client_message.read_str(), client_message.read_long())
        replica_timestamps.append(replica_timestamps_item)

    parameters['replica_timestamps'] = ImmutableLazyDataList(replica_timestamps, to_object)
    parameters['replica_count'] = client_message.read_int()
    return parameters