code: def convert(self, format="png", **kwargs):
          
          if format.upper() in cairosvg.SURFACES:
              surface = cairosvg.SURFACES[format.upper()]
          else:
              raise Exception("'%s' image format unavailable: use one of %s" %
                              (format.upper(), list(cairosvg.SURFACES.keys())))
          return surface.convert(bytestring=str(self), **kwargs)
docs: png, ps, pdf, gif, jpg, svg
          returns image in format as bytes