how to import pygraphviz code example
Example 1: install pygraphviz
pip install pygraphviz
Example 2: pygraphviz show
>>> G.draw('file.png') # write previously positioned graph to PNG file
>>> G.draw('file.ps',prog='circo') # use circo to position, write PS file