code: func cadvisorInfoToNetworkStats(name string, info *cadvisorapiv2.ContainerInfo) *statsapi.NetworkStats {
  	if !info.Spec.HasNetwork {
  		return nil
  	}
  	cstat, found := latestContainerStats(info)
  	if !found {
  		return nil
  	}
  
  	if cstat.Network == nil {
  		return nil
  	}
  
  	iStats := statsapi.NetworkStats{
  		Time: metav1.NewTime(cstat.Timestamp),
  	}
  
  	for i := range cstat.Network.Interfaces {
  		inter := cstat.Network.Interfaces[i]
  		iStat := statsapi.InterfaceStats{
  			Name:     inter.Name,
  			RxBytes:  &inter.RxBytes,
  			RxErrors: &inter.RxErrors,
  			TxBytes:  &inter.TxBytes,
  			TxErrors: &inter.TxErrors,
  		}
  
  		if inter.Name == defaultNetworkInterfaceName {
  			iStats.InterfaceStats = iStat
  		}
  
  		iStats.Interfaces = append(iStats.Interfaces, iStat)
  	}
  
  	return &iStats
  }
docs: // cadvisorInfoToNetworkStats returns the statsapi.NetworkStats converted from
  // the container info from cadvisor.