<s> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> from . client_message_serializer import ClientMessageSerializer <EOL> from . constants import MSG_SUB <EOL> __all__ = [ '<STR_LIT>' ] <EOL> class SubMessageSerializer ( ClientMessageSerializer ) : <EOL> MESSAGE_TYPE = MSG_SUB <EOL> def serialize_fields ( self , message ) : <EOL> fields = { '<STR_LIT:id>' : message . id , '<STR_LIT:name>' : message . name } <EOL> if message . has_params ( ) : <EOL> fields [ '<STR_LIT>' ] = message . params <EOL> return fields </s>
