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

import (
	"math"
	"sort"
	"time"

	"github.com/cointop-sh/cointop/pkg/humanize"
)

// ResampleTimeSeriesData resamples the given [timestamp,value] data to numsteps between start-end (returns numSteps+1 points).
// If the data do
    
func BuildTimeSeriesLabels(data [][]float64) []string {
	minTime := time.UnixMilli(int64(data[0][0]))
	maxTime := time.UnixMilli(int64(data[len(data)-1][0]))
	timeRange := maxTime.Sub(minTime)

	var timeFormat string
	if timeRange.Hours() < 24 {
		timeFormat = "15:04"
	} else if timeRange.Hours() < 24*7 {
		timeFormat = "Mon 15:04"
	} else if timeRange.Hours() < 24*365 {
		timeFormat = "02-Jan"
	} else {
		timeFormat = "Jan 2006"
	}
	var labels []string
	for i := range data {
		labelTime := time.UnixMilli(int64(data[i][0]))
		labels = append(labels, humanize.FormatTime(labelTime, timeFormat))
	}
	return labels
}