class_docstr: General-purpose dependency graph.
  
  Essentially a directed acyclic graph.
  Usually used to find an evaluation order for e.g. variable substitution
  The relation that an edge between A and B represents is:
  "A depends on B, i.e. B should be evaluated before A"
  
  Nodes can be added explicitly or they can be created implicitly
  while adding edges.
  Nodes have keys, which should be some hashable value that identifies
  the elements the graph represents in your use case. E.G. they can just
  be the variable name you want to substitute.
  However, if needed, more generally you can attach any data to a node
  (e.g. a path in your tree), and if so desired, a unique key can be
  created for you. You'll only need to know that key while adding edges
  to/from it.
  Implicit keys and explicit keys can also be mixed.
docstr: Adds an edge, and implicitly also creates nodes for keys which have
  not been seen before. This will not let you add data to your nodes.
  The relation encodes: "from_key depends on to_key"
  (to_key must be evaluated before from_key).
  
  Arguments
  ---------
  from_key : hashable
      The key which depends on.
  to_key : hashable
      The key which is depended on.
  
  Returns
  -------
  None
docstr_tok: ["Adds","an","edge",",","and","implicitly","also","creates","nodes","for","keys","which","have","not","been","seen","before",".","This","will","not","let","you","add","data","to","your","nodes",".","The","relation","encodes",":","``","from_key","depends","on","to_key","''","(","to_key","must","be","evaluated","before","from_key",")",".","Arguments","--","--","--","--","-","from_key",":","hashable","The","key","which","depends","on",".","to_key",":","hashable","The","key","which","is","depended","on",".","Returns","--","--","--","-","None"]
code: def add_edge(self, from_key, to_key):
      """Adds an edge, and implicitly also creates nodes for keys which have
      not been seen before. This will not let you add data to your nodes.
      The relation encodes: "from_key depends on to_key"
      (to_key must be evaluated before from_key).
  
      Arguments
      ---------
      from_key : hashable
          The key which depends on.
      to_key : hashable
          The key which is depended on.
  
      Returns
      -------
      None
      """
      from_ind = self._get_ind_and_add_if_new(from_key)
      to_ind = self._get_ind_and_add_if_new(to_key)
      edges_list = self.digraph[from_ind].edges
      if to_ind not in edges_list:
          edges_list.append(to_ind)
  
file_path: speechbrain/speechbrain/utils/depgraph.py
imports: import collections
  import uuid
label_desc: Use image node_id 4 for calling the DependencyGraph obj's underlying member method code with example usage: obj.add_edge(from_key, to_key) without return types