function makeValidatedGraph(dependencies, resolver = undefined) {
  const g = new depGraph.Graph(dependencies, resolver);
  g.validate();
  return g;
}
@param {!Array<!depGraph.Dependency>} dependencies
@param {!depGraph.ModuleResolver=} moduleResolver
@return {!depGraph.Graph}