code: func hcsStatsToNetworkStats(timestamp time.Time, hcsStats []hcsshim.NetworkStats) *statsapi.NetworkStats {
  	result := &statsapi.NetworkStats{
  		Time:       metav1.NewTime(timestamp),
  		Interfaces: make([]statsapi.InterfaceStats, 0),
  	}
  
  	adapters := sets.NewString()
  	for _, stat := range hcsStats {
  		iStat, err := hcsStatsToInterfaceStats(stat)
  		if err != nil {
  			klog.Warningf("Failed to get HNS endpoint %q with error '%v', continue to get stats for other endpoints", stat.EndpointId, err)
  			continue
  		}
  
  		// Only count each adapter once.
  		if adapters.Has(iStat.Name) {
  			continue
  		}
  
  		result.Interfaces = append(result.Interfaces, *iStat)
  		adapters.Insert(iStat.Name)
  	}
  
  	// TODO(feiskyer): add support of multiple interfaces for getting default interface.
  	if len(result.Interfaces) > 0 {
  		result.InterfaceStats = result.Interfaces[0]
  	}
  
  	return result
  }
docs: // hcsStatsToNetworkStats converts hcsshim.Statistics.Network to statsapi.NetworkStats