code: func (ds *dockerService) ListContainerStats(ctx context.Context, r *runtimeapi.ListContainerStatsRequest) (*runtimeapi.ListContainerStatsResponse, error) {
  	containerStatsFilter := r.GetFilter()
  	filter := &runtimeapi.ContainerFilter{}
  
  	if containerStatsFilter != nil {
  		filter.Id = containerStatsFilter.Id
  		filter.PodSandboxId = containerStatsFilter.PodSandboxId
  		filter.LabelSelector = containerStatsFilter.LabelSelector
  	}
  
  	listResp, err := ds.ListContainers(ctx, &runtimeapi.ListContainersRequest{Filter: filter})
  	if err != nil {
  		return nil, err
  	}
  
  	var stats []*runtimeapi.ContainerStats
  	for _, container := range listResp.Containers {
  		containerStats, err := ds.getContainerStats(container.Id)
  		if err != nil {
  			return nil, err
  		}
  
  		stats = append(stats, containerStats)
  	}
  
  	return &runtimeapi.ListContainerStatsResponse{Stats: stats}, nil
  }
docs: // ListContainerStats returns stats for a list container stats request based on a filter.