code: def render_to_file(self, filename, **kwargs):
          
          with io.open(filename, 'w', encoding='utf-8') as f:
              f.write(self.render(is_unicode=True, **kwargs))
docs: Render the graph, and write it to filename