code: func (d *Helper) GetPodsForDeletion(nodeName string) (*podDeleteList, []error) {
  	labelSelector, err := labels.Parse(d.PodSelector)
  	if err != nil {
  		return nil, []error{err}
  	}
  
  	podList, err := d.Client.CoreV1().Pods(metav1.NamespaceAll).List(metav1.ListOptions{
  		LabelSelector: labelSelector.String(),
  		FieldSelector: fields.SelectorFromSet(fields.Set{"spec.nodeName": nodeName}).String()})
  	if err != nil {
  		return nil, []error{err}
  	}
  
  	pods := []podDelete{}
  
  	for _, pod := range podList.Items {
  		var status podDeleteStatus
  		for _, filter := range d.makeFilters() {
  			status = filter(pod)
  			if !status.delete {
  				// short-circuit as soon as pod is filtered out
  				// at that point, there is no reason to run pod
  				// through any additional filters
  				break
  			}
  		}
  		pods = append(pods, podDelete{
  			pod:    pod,
  			status: status,
  		})
  	}
  
  	list := &podDeleteList{items: pods}
  
  	if errs := list.errors(); len(errs) > 0 {
  		return list, errs
  	}
  
  	return list, nil
  }
docs: // GetPodsForDeletion receives resource info for a node, and returns those pods as PodDeleteList,
  // or error if it cannot list pods. All pods that are ready to be deleted can be obtained with .Pods(),
  // and string with all warning can be obtained with .Warnings(), and .Errors() for all errors that
  // occurred during deletion.