code: func (d *namespacedResourcesDeleter) estimateGracefulTerminationForPods(ns string) (int64, error) {
  	klog.V(5).Infof("namespace controller - estimateGracefulTerminationForPods - namespace %s", ns)
  	estimate := int64(0)
  	podsGetter := d.podsGetter
  	if podsGetter == nil || reflect.ValueOf(podsGetter).IsNil() {
  		return estimate, fmt.Errorf("unexpected: podsGetter is nil. Cannot estimate grace period seconds for pods")
  	}
  	items, err := podsGetter.Pods(ns).List(metav1.ListOptions{})
  	if err != nil {
  		return estimate, err
  	}
  	for i := range items.Items {
  		pod := items.Items[i]
  		// filter out terminal pods
  		phase := pod.Status.Phase
  		if v1.PodSucceeded == phase || v1.PodFailed == phase {
  			continue
  		}
  		if pod.Spec.TerminationGracePeriodSeconds != nil {
  			grace := *pod.Spec.TerminationGracePeriodSeconds
  			if grace > estimate {
  				estimate = grace
  			}
  		}
  	}
  	return estimate, nil
  }
docs: // estimateGracefulTerminationForPods determines the graceful termination period for pods in the namespace