def msg(self, msg_type, content=None, parent=None, header=None, metadata=None):
        msg = {}
        header = self.msg_header(msg_type) if header is None else header
        msg['header'] = header
        msg['msg_id'] = header['msg_id']
        msg['msg_type'] = header['msg_type']
        msg['parent_header'] = {} if parent is None else extract_header(parent)
        msg['content'] = {} if content is None else content
        msg['metadata'] = self.metadata.copy()
        if metadata is not None:
            msg['metadata'].update(metadata)
        return msg
Return the nested message dict.
dataset/ETHPy150Open jupyter/jupyter_client/jupyter_client/session.py/Session.msg