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: unique.go
    path of file: ./repos/pie/v2
    
    the code of the file until where you have to start completion: package pie

// Unique returns a new slice with all of the unique values.
//
// The items will be returned in a randomized order, even with the same input.
//
// The number of items returned may be the same as the input or less. It will
// neve
    
func Unique[T comparable](ss []T) []T {
	// Avoid the allocation. If there is one element or less it is already
	// unique.
	if len(ss) < 2 {
		return ss
	}

	values := map[T]struct{}{}

	for _, value := range ss {
		values[value] = struct{}{}
	}

	return Keys(values)
}