code: def fromstring(text):
      
      fig = SVGFigure()
      svg = etree.fromstring(text.encode())
  
      fig.root = svg
  
      return fig
docs: Create a SVG figure from a string.
  
      Parameters
      ----------
      text : str
          string representing the SVG content. Must be valid SVG.
  
      Returns
      -------
      SVGFigure
          newly created :py:class:`SVGFigure` initialised with the string
          content.