code: func (kl *Kubelet) podIsTerminated(pod *v1.Pod) bool {
  	// Check the cached pod status which was set after the last sync.
  	status, ok := kl.statusManager.GetPodStatus(pod.UID)
  	if !ok {
  		// If there is no cached status, use the status from the
  		// apiserver. This is useful if kubelet has recently been
  		// restarted.
  		status = pod.Status
  	}
  	return status.Phase == v1.PodFailed || status.Phase == v1.PodSucceeded || (pod.DeletionTimestamp != nil && notRunning(status.ContainerStatuses))
  }
docs: // podIsTerminated returns true if pod is in the terminated state ("Failed" or "Succeeded").