You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: graph.go
    path of file: ./repos/depsdev/pkg/output
    
    the code of the file until where you have to start completion: /*

depsdev - CLI client for deps.dev API.
Free access to dependencies, licenses, advisories, and other critical health and security signals for open 
    
func GenerateGraph(d depsdev.Dependencies) (string, error) {
	if d.Error != "" {
		return "", fmt.Errorf("%w: %s", ErrGraphDependencies, d.Error)
	}

	var result = ""

	for _, n := range d.Nodes {
		for _, e := range n.Errors {
			if e != "" {
				return "", fmt.Errorf("%w: %s", ErrGraphNode,
					n.VersionKey.System+" "+
						n.VersionKey.Name+" "+
						n.VersionKey.Version+
						": "+e)
			}
		}
	}

	result += "digraph {\n"

	for i, n := range d.Nodes {
		result += fmt.Sprintf("  %d [label=%q];\n", i, n.VersionKey.Name+"@"+n.VersionKey.Version)
	}

	for _, e := range d.Edges {
		result += fmt.Sprintf("  %d -> %d [label=%q];\n", e.FromNode, e.ToNode, e.Requirement)
	}

	result += "}\n"

	return result, nil
}