creating a dynamic way to create the dot file and keeping the graph in a python file