def serialize_messages(self, messages):
    encoder = MessageEncoder(separators=(',', ':'))
    return encoder.encode(messages)
def serialize_messages(self, messages):
    encoder = MessageEncoder(separators=(',', ':'))
    return encoder.encode(messages)