title: How to find all node's ancestors in NetworkX?
body: <p>I have a large <code>DiGraph</code> that consists of dependent jobs. For example, for the graph a>b>c, job c can run only once job b is completed. I tried to find a function that gets all c's upstream jobs (that is (a, b)). I used <code>DiGraph.predecessors</code>, but it only returns job b.</p>
  
  <p>Is there a function that will list all c's upstream jobs?</p>
  
  <p>How can I draw the dependency diagram for a leaf node (like job c)?</p>
  
  <p>I have read the documentation but couldn't find the answer.</p>