def _insert_svg(self, cursor, svg):
        """ Insert raw SVG data into the widet.
        """
        try:
            image = svg_to_image(svg)
        except __HOLE__:
            self._insert_plain_text(cursor, 'Received invalid SVG data.')
        else:
            format = self._add_image(image)
            self._name_to_svg_map[format.name()] = svg
            cursor.insertBlock()
            cursor.insertImage(format)
            cursor.insertBlock()
dataset/ETHPy150Open ipython/ipython-py3k/IPython/frontend/qt/console/rich_ipython_widget.py/RichIPythonWidget._insert_svg