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

import (
	"sort"

	c "github.com/achannarasappa/ticker/internal/common"
)

// Sorter represents a function that sorts quotes
type Sorter func([]c.Asset) []c.Asset

// NewSo
    
func sortByChange(assetsIn []c.Asset) []c.Asset {

	assetCount := len(assetsIn)

	if assetCount <= 0 {
		return assetsIn
	}

	assets := make([]c.Asset, assetCount)
	copy(assets, assetsIn)

	activeAssets, inactiveAssets := splitActiveAssets(assets)

	sort.SliceStable(activeAssets, func(i, j int) bool {
		return activeAssets[j].QuotePrice.ChangePercent < activeAssets[i].QuotePrice.ChangePercent
	})

	sort.SliceStable(inactiveAssets, func(i, j int) bool {
		return inactiveAssets[j].QuotePrice.ChangePercent < inactiveAssets[i].QuotePrice.ChangePercent
	})

	return append(activeAssets, inactiveAssets...)

}