code: func ImportDirsUsed(importDirs []string, protos []string) []string {
  	used := []string{}
  	for _, imp := range importDirs {
  		for _, proto := range protos {
  			if strings.HasPrefix(proto, imp) {
  				used = append(used, imp)
  				break
  			}
  		}
  	}
  	return used
  }
docs: // ImportDirsUsed returns the set of import directories that contain
  // entries in the set of proto files.