def calculate_size(name, key, local_only):
data_size = <NUM_LIT:0><EOL>data_size += calculate_size_str(name)<EOL>data_size += calculate_size_data(key)<EOL>data_size += BOOLEAN_SIZE_IN_BYTES<EOL>return data_size<EOL>
Calculates the request payload size