def METHOD_NAME(message_code: ServerMessage, fn: Callable[[bytearray], None]):
    '''
    Create a message to be sent on the network
    A message has the shape
    MSG_LENGTH | MSG_CODE | DATA
    where MSG_LENGTH is the length of DATA (in bytes), and MSG_CODE is the operation to be performed
    '''
    data = bytearray()
    temp_length = struct.pack('>I', 0)
    data.extend(temp_length)
    data.extend(struct.pack(f'{SERVER_OPERATION_CODE_LENGTH}s', message_code.value.encode('UTF-8')))
    header_length = struct.calcsize(f'>I{SERVER_OPERATION_CODE_LENGTH}s')
    fn(data)
    data[0:struct.calcsize('>I')] = struct.pack('>I', len(data) - header_length)
    return data