code: private void initializeDependentKeys() {
          visit(new Visitor<NodeT>() {
              @Override
              public void visitNode(NodeT node) {
                  if (node.dependencyKeys().isEmpty()) {
                      return;
                  }
  
                  String dependentKey = node.key();
                  for (String dependencyKey : node.dependencyKeys()) {
                      nodeTable.get(dependencyKey)
                              .addDependent(dependentKey);
                  }
              }
  
              @Override
              public  void visitEdge(String fromKey, String toKey, EdgeType edgeType) {
                  if (edgeType == EdgeType.BACK) {
                      throw new IllegalStateException("Detected circular dependency: " + findPath(fromKey, toKey));
                  }
              }
          });
      }
docs: Initializes dependents of all nodes.
  <p>
  The DAG will be explored in DFS order and all node's dependents will be identified,
  this prepares the DAG for traversal using getNext method, each call to getNext returns next node
  in the DAG with no dependencies.