code: func CreatePodTemplate(template v1.PodTemplateSpec, generation *int64, hash string) v1.PodTemplateSpec {
  	newTemplate := *template.DeepCopy()
  
  	AddOrUpdateDaemonPodTolerations(&newTemplate.Spec)
  
  	if newTemplate.ObjectMeta.Labels == nil {
  		newTemplate.ObjectMeta.Labels = make(map[string]string)
  	}
  	if generation != nil {
  		newTemplate.ObjectMeta.Labels[extensions.DaemonSetTemplateGenerationKey] = fmt.Sprint(*generation)
  	}
  	// TODO: do we need to validate if the DaemonSet is RollingUpdate or not?
  	if len(hash) > 0 {
  		newTemplate.ObjectMeta.Labels[extensions.DefaultDaemonSetUniqueLabelKey] = hash
  	}
  	return newTemplate
  }
docs: // CreatePodTemplate returns copy of provided template with additional
  // label which contains templateGeneration (for backward compatibility),
  // hash of provided template and sets default daemon tolerations.