code: func statsFormatWrite(ctx formatter.Context, Stats []StatsEntry, osType string, trunc bool) error {
  	render := func(format func(subContext formatter.SubContext) error) error {
  		for _, cstats := range Stats {
  			statsCtx := &statsContext{
  				s:     cstats,
  				os:    osType,
  				trunc: trunc,
  			}
  			if err := format(statsCtx); err != nil {
  				return err
  			}
  		}
  		return nil
  	}
  	memUsage := memUseHeader
  	if osType == winOSType {
  		memUsage = winMemUseHeader
  	}
  	statsCtx := statsContext{}
  	statsCtx.Header = formatter.SubHeaderContext{
  		"Container": containerHeader,
  		"Name":      formatter.NameHeader,
  		"ID":        formatter.ContainerIDHeader,
  		"CPUPerc":   cpuPercHeader,
  		"MemUsage":  memUsage,
  		"MemPerc":   memPercHeader,
  		"NetIO":     netIOHeader,
  		"BlockIO":   blockIOHeader,
  		"PIDs":      pidsHeader,
  	}
  	statsCtx.os = osType
  	return ctx.Write(&statsCtx, render)
  }
docs: // statsFormatWrite renders the context for a list of containers statistics