code: func (s *StoreToDaemonSetLister) GetPodDaemonSets(pod *api.Pod) (daemonSets []extensions.DaemonSet, err error) {
  	var selector labels.Selector
  	var daemonSet extensions.DaemonSet
  
  	if len(pod.Labels) == 0 {
  		err = fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name)
  		return
  	}
  
  	for _, m := range s.Store.List() {
  		daemonSet = *m.(*extensions.DaemonSet)
  		if daemonSet.Namespace != pod.Namespace {
  			continue
  		}
  		selector, err = unversioned.LabelSelectorAsSelector(daemonSet.Spec.Selector)
  		if err != nil {
  			// this should not happen if the DaemonSet passed validation
  			return nil, err
  		}
  
  		// If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything.
  		if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
  			continue
  		}
  		daemonSets = append(daemonSets, daemonSet)
  	}
  	if len(daemonSets) == 0 {
  		err = fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
  	}
  	return
  }
docs: // GetPodDaemonSets returns a list of daemon sets managing a pod.
  // Returns an error if and only if no matching daemon sets are found.