class_docstr: Tracks nodes and edges of a directed graph and supports basic operations on them.
class_docstr_tok: ["Tracks","nodes","and","edges","of","a","directed","graph","and","supports","basic","operations","on","them","."]
code: def save(self, path, format="png"):
      # TODO: assert on acceptable format values
      dot = self.build_dot(self.orientation)
      dot.format = format
      directory, file_name = os.path.split(path)
      # Remove extension from file name. dot.render() adds it.
      file_name = file_name.replace("." + format, "")
      dot.render(file_name, directory=directory, cleanup=True)
  
imports: from __future__ import absolute_import, division, print_function
  import os
  import re
  from random import getrandbits
  import inspect
  import numpy
  import html
label_desc: Use image node_id 16 for calling the Graph obj's underlying member method code with example usage: obj.save(path, format) without return types