code: func cachedStatsFunc(podStats []statsapi.PodStats) statsFunc {
  	uid2PodStats := map[string]statsapi.PodStats{}
  	for i := range podStats {
  		uid2PodStats[podStats[i].PodRef.UID] = podStats[i]
  	}
  	return func(pod *v1.Pod) (statsapi.PodStats, bool) {
  		stats, found := uid2PodStats[string(pod.UID)]
  		return stats, found
  	}
  }
docs: // cachedStatsFunc returns a statsFunc based on the provided pod stats.