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: ot_aat_layout.go
    path of file: ./repos/caire/vendor/github.com/go-text/typesetting/harfbuzz
    
    the code of the file until where you have to start completion: package harfbuzz

import (
	"fmt"

	"github.com/go-text/typesetting/opentype/api/font"
	"github.com/go-text/typesetting/opentype/loader"
	"github.
    
func getTracking(td tables.TrackData, ptem float32, trackValue float32) float32 {
	// Choose track.

	var trackTableEntry *tables.TrackTableEntry
	for i := range td.TrackTable {
		/* Note: Seems like the track entries are sorted by values.  But the
		 * spec doesn't explicitly say that.  It just mentions it in the example. */

		if td.TrackTable[i].Track == trackValue {
			trackTableEntry = &td.TrackTable[i]
			break
		}
	}
	if trackTableEntry == nil {
		return 0.
	}

	// Choose size.

	if len(td.SizeTable) == 0 {
		return 0.
	}
	if len(td.SizeTable) == 1 {
		return float32(trackTableEntry.PerSizeTracking[0])
	}

	var sizeIndex int
	for sizeIndex = range td.SizeTable {
		if td.SizeTable[sizeIndex] >= ptem {
			break
		}
	}
	if sizeIndex != 0 {
		sizeIndex = sizeIndex - 1
	}
	return interpolateAt(td, sizeIndex, ptem, trackTableEntry.PerSizeTracking)
}