code: func NormalizeLegacyCapabilities(caps []string) ([]string, error) {
  	var normalized []string
  
  	valids := GetAllCapabilities()
  	for _, c := range caps {
  		c = strings.ToUpper(c)
  		if c == allCapabilities {
  			normalized = append(normalized, c)
  			continue
  		}
  		if !strings.HasPrefix(c, "CAP_") {
  			c = "CAP_" + c
  		}
  		if !inSlice(valids, c) {
  			return nil, errdefs.InvalidParameter(fmt.Errorf("unknown capability: %q", c))
  		}
  		normalized = append(normalized, c)
  	}
  	return normalized, nil
  }
docs: // NormalizeLegacyCapabilities normalizes, and validates CapAdd/CapDrop capabilities
  // by upper-casing them, and adding a CAP_ prefix (if not yet present).
  //
  // This function also accepts the "ALL" magic-value, that's used by CapAdd/CapDrop.