Calculates the request payload size

def calculate_size(name, replica_timestamps, target_replica):
    """ Calculates the request payload size"""
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += INT_SIZE_IN_BYTES
    for replica_timestamps_item in replica_timestamps:
        key = replica_timestamps_item[0]
        val = replica_timestamps_item[1]
        data_size += calculate_size_str(key)
        data_size += LONG_SIZE_IN_BYTES

    data_size += calculate_size_address(target_replica)
    return data_size