code: func (s *Server) filterContainerList(filter *pb.ContainerFilter, origCtrList []*oci.Container) []*oci.Container {
  	// Filter using container id and pod id first.
  	if filter.Id != "" {
  		id, err := s.CtrIDIndex().Get(filter.Id)
  		if err != nil {
  			// If we don't find a container ID with a filter, it should not
  			// be considered an error.  Log a warning and return an empty struct
  			logrus.Warnf("unable to find container ID %s", filter.Id)
  			return []*oci.Container{}
  		}
  		c := s.ContainerServer.GetContainer(id)
  		if c != nil {
  			switch {
  			case filter.PodSandboxId == "":
  				return []*oci.Container{c}
  			case c.Sandbox() == filter.PodSandboxId:
  				return []*oci.Container{c}
  			default:
  				return []*oci.Container{}
  			}
  		}
  	} else if filter.PodSandboxId != "" {
  		pod := s.ContainerServer.GetSandbox(filter.PodSandboxId)
  		if pod == nil {
  			return []*oci.Container{}
  		}
  		return pod.Containers().List()
  	}
  	logrus.Debug("no filters were applied, returning full container list")
  	return origCtrList
  }
docs: // filterContainerList applies a protobuf-defined filter to retrieve only intended containers. Not matching
  // the filter is not considered an error but will return an empty response.