async def message(self, msg, msg_type=None, use_version=None):
elem_type = msg_type if msg_type is not None else msg.__class__<EOL>version = await self.version(elem_type, None, elem=msg) if use_version is None else use_version<EOL>if self.is_tracked():<EOL><INDENT>return self.get_tracked()<EOL><DEDENT>if hasattr(elem_type, '<STR_LIT>'):<EOL><INDENT>msg = elem_type() if msg is None else msg<EOL>self.pop_track(use_version is None)<EOL>return await msg.boost_serialize(self, version=version)<EOL><DEDENT>if self.writing:<EOL><INDENT>self.pop_track(use_version is None)<EOL>return await self.dump_message(msg, msg_type=msg_type)<EOL><DEDENT>else:<EOL><INDENT>obj = await self.load_message(msg_type, msg=msg)<EOL>return self.track_obj(obj, use_version is None)<EOL><DEDENT>
Loads/dumps message
:param msg:
:param msg_type:
:param use_version:
:return: