code: func sortDependencies(root Root, depFunc func(Root) []Root) []Root {
  	seen := make(map[string]bool, len(roots))
  	var sorted []Root
  	sortDependenciesR(root, seen, &sorted, depFunc)
  	return sorted
  }
docs: // sortDependencies sorts the depencies of the given root in the given slice.