code: public DirectedGraph<ModuleId, DefaultEdge> getModuleNameGraph() {
          SimpleDirectedGraph<ModuleId, DefaultEdge> graph = new SimpleDirectedGraph<ModuleId, DefaultEdge>(DefaultEdge.class);
          Map<ModuleId, ModuleIdentifier> moduleIdentifiers = getLatestRevisionIds();
          GraphUtils.addAllVertices(graph, moduleIdentifiers.keySet());
          for (Entry<ModuleId, ModuleIdentifier> entry : moduleIdentifiers.entrySet()) {
              ModuleId scriptModuleId = entry.getKey();
              ModuleIdentifier revisionID = entry.getValue();
              ModuleSpec moduleSpec = moduleSpecs.get(revisionID);
              Set<ModuleId> dependencyNames = getDependencyScriptModuleIds(moduleSpec);
              GraphUtils.addOutgoingEdges(graph, scriptModuleId, dependencyNames);
          }
          return graph;
      }
docs: Construct the Module dependency graph of a module loader where each vertex is the module name
  @return a mutable snapshot of the underlying dependency