def to_dict(self):
        """Render a MessageElement as python dict.

        :return: Python dict representation
        :rtype: dict
        """
        return {
            'type': self.__class__.__name__,
            'element_id': self.element_id,
            'style_class': self.style_class,
            'icon': self.icon,
            'attributes': self.attributes
        }
Render a MessageElement as python dict.

        :return: Python dict representation
        :rtype: dict