code: func (i *ImportRestriction) forbiddenImportsFor(pkg Package) []string {
  	forbiddenImportSet := map[string]struct{}{}
  	imports := pkg.Imports
  	if !i.ExcludeTests {
  		imports = append(imports, append(pkg.TestImports, pkg.XTestImports...)...)
  	}
  	for _, imp := range imports {
  		path := extractVendorPath(imp)
  		if i.isForbidden(path) {
  			forbiddenImportSet[path] = struct{}{}
  		}
  	}
  
  	var forbiddenImports []string
  	for imp := range forbiddenImportSet {
  		forbiddenImports = append(forbiddenImports, imp)
  	}
  	return forbiddenImports
  }
docs: // forbiddenImportsFor determines all of the forbidden
  // imports for a package given the import restrictions
  // and returns a deduplicated list of them