title: get all leaf nodes of a directed graph in pydot
body: <p>I create a directed tree using pydot and visualize it. That is fine but I would also like to retrieve the leaf nodes of the tree. How can I do that?</p>
  
  <p>In general the question is how to access the nodes and edges that are stored inside the pydot object. Does pydot provide this functionality or is it just a visualisation engine?</p>