class_docstr: Really simple unweighted directed graph data structure to track dependencies.
  
  The API is pretty much the same as networkx so if you add something just
  copy their API.
class_docstr_tok: ["Really","simple","unweighted","directed","graph","data","structure","to","track","dependencies",".","The","API","is","pretty","much","the","same","as","networkx","so","if","you","add","something","just","copy","their","API","."]
docstr: Returns a list of nodes that show the first path that resulted in dst being added to the graph.
docstr_tok: ["Returns","a","list","of","nodes","that","show","the","first","path","that","resulted","in","dst","being","added","to","the","graph","."]
code: def first_path(self, dst: str) -> List[str]:
      """Returns a list of nodes that show the first path that resulted in dst being added to the graph."""
      path = []
  
      while dst:
          path.append(dst)
          candidates = self._pred[dst].keys()
          dst, min_idx = "", None
          for candidate in candidates:
              idx = self._node_order.get(candidate, None)
              if idx is None:
                  break
              if min_idx is None or idx < min_idx:
                  min_idx = idx
                  dst = candidate
  
      return list(reversed(path))
  
file_path: pytorch/torch/package/_digraph.py
imports: from collections import deque
  from typing import List, Set
label_desc: Use image node_id 13 for calling the DiGraph obj's underlying member method code with example usage: obj.first_path(dst) and returns: list