async def prepare_message(self, msg, msg_type):
if self.writing:<EOL><INDENT>return<EOL><DEDENT>return set_elem(msg, msg_type())<EOL>
Prepares message for serialization
:param msg:
:param msg_type:
:return: