code: def render(self, filename=None, directory=None, view=False, cleanup=False,
                 format=None, renderer=None, formatter=None):
          
          filepath = self.save(filename, directory)
  
          if format is None:
              format = self._format
  
          rendered = backend.render(self._engine, format, filepath, renderer, formatter)
  
          if cleanup:
              os.remove(filepath)
  
          if view:
              self._view(rendered, self._format)
  
          return rendered
docs: Save the source to file and render with the Graphviz engine.
  
          Args:
              filename: Filename for saving the source (defaults to ``name`` + ``'.gv'``)
              directory: (Sub)directory for source saving and rendering.
              view (bool): Open the rendered result with the default application.
              cleanup (bool): Delete the source file after rendering.
              format: The output format used for rendering (``'pdf'``, ``'png'``, etc.).
              renderer: The output renderer used for rendering (``'cairo'``, ``'gd'``, ...).
              formatter: The output formatter used for rendering (``'cairo'``, ``'gd'``, ...).
          Returns:
              The (possibly relative) path of the rendered file.
          Raises:
              ValueError: If ``format``, ``renderer``, or ``formatter`` are not known.
              graphviz.RequiredArgumentError: If ``formatter`` is given but ``renderer`` is None.
              graphviz.ExecutableNotFound: If the Graphviz executable is not found.
              subprocess.CalledProcessError: If the exit status is non-zero.
              RuntimeError: If viewer opening is requested but not supported.