code: def render_to_png(self, filename=None, dpi=72, **kwargs):
          
          import cairosvg
          return cairosvg.svg2png(
              bytestring=self.render(**kwargs), write_to=filename, dpi=dpi
          )
docs: Render the graph, convert it to png and write it to filename