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