code: func (r *BindingREST) setPodHostAndAnnotations(ctx context.Context, podID, oldMachine, machine string, annotations map[string]string, dryRun bool) (finalPod *api.Pod, err error) {
  	podKey, err := r.store.KeyFunc(ctx, podID)
  	if err != nil {
  		return nil, err
  	}
  	err = r.store.Storage.GuaranteedUpdate(ctx, podKey, &api.Pod{}, false, nil, storage.SimpleUpdate(func(obj runtime.Object) (runtime.Object, error) {
  		pod, ok := obj.(*api.Pod)
  		if !ok {
  			return nil, fmt.Errorf("unexpected object: %#v", obj)
  		}
  		if pod.DeletionTimestamp != nil {
  			return nil, fmt.Errorf("pod %s is being deleted, cannot be assigned to a host", pod.Name)
  		}
  		if pod.Spec.NodeName != oldMachine {
  			return nil, fmt.Errorf("pod %v is already assigned to node %q", pod.Name, pod.Spec.NodeName)
  		}
  		pod.Spec.NodeName = machine
  		if pod.Annotations == nil {
  			pod.Annotations = make(map[string]string)
  		}
  		for k, v := range annotations {
  			pod.Annotations[k] = v
  		}
  		podutil.UpdatePodCondition(&pod.Status, &api.PodCondition{
  			Type:   api.PodScheduled,
  			Status: api.ConditionTrue,
  		})
  		finalPod = pod
  		return pod, nil
  	}), dryRun)
  	return finalPod, err
  }
docs: // setPodHostAndAnnotations sets the given pod's host to 'machine' if and only if it was
  // previously 'oldMachine' and merges the provided annotations with those of the pod.
  // Returns the current state of the pod, or an error.