code: func (m *kubeGenericRuntimeManager) restoreSpecsFromContainerLabels(containerID kubecontainer.ContainerID) (*v1.Pod, *v1.Container, error) {
  	var pod *v1.Pod
  	var container *v1.Container
  	s, err := m.runtimeService.ContainerStatus(containerID.ID)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	l := getContainerInfoFromLabels(s.Labels)
  	a := getContainerInfoFromAnnotations(s.Annotations)
  	// Notice that the followings are not full spec. The container killing code should not use
  	// un-restored fields.
  	pod = &v1.Pod{
  		ObjectMeta: metav1.ObjectMeta{
  			UID:                        l.PodUID,
  			Name:                       l.PodName,
  			Namespace:                  l.PodNamespace,
  			DeletionGracePeriodSeconds: a.PodDeletionGracePeriod,
  		},
  		Spec: v1.PodSpec{
  			TerminationGracePeriodSeconds: a.PodTerminationGracePeriod,
  		},
  	}
  	container = &v1.Container{
  		Name:                   l.ContainerName,
  		Ports:                  a.ContainerPorts,
  		TerminationMessagePath: a.TerminationMessagePath,
  	}
  	if a.PreStopHandler != nil {
  		container.Lifecycle = &v1.Lifecycle{
  			PreStop: a.PreStopHandler,
  		}
  	}
  	return pod, container, nil
  }
docs: // restoreSpecsFromContainerLabels restores all information needed for killing a container. In some
  // case we may not have pod and container spec when killing a container, e.g. pod is deleted during
  // kubelet restart.
  // To solve this problem, we've already written necessary information into container labels. Here we
  // just need to retrieve them from container labels and restore the specs.
  // TODO(random-liu): Add a node e2e test to test this behaviour.
  // TODO(random-liu): Change the lifecycle handler to just accept information needed, so that we can
  // just pass the needed function not create the fake object.