async def message(self, msg, msg_type=None):
elem_type = msg_type if msg_type is not None else msg.__class__<EOL>if hasattr(elem_type, '<STR_LIT>'):<EOL><INDENT>msg = elem_type() if msg is None else msg<EOL>return await msg.blob_serialize(self)<EOL><DEDENT>fields = elem_type.f_specs()<EOL>for field in fields:<EOL><INDENT>await self.message_field(msg=msg, field=field)<EOL><DEDENT>return msg<EOL>
Loads/dumps message
:param msg:
:param msg_type:
:param obj:
:return: