code: func (*Instances) Delete(c context.Context, req *instances.DeleteRequest) (*empty.Empty, error) {
  	if req.GetId() == "" {
  		return nil, status.Errorf(codes.InvalidArgument, "ID is required")
  	}
  	vm := &model.VM{
  		ID: req.Id,
  	}
  	if err := datastore.RunInTransaction(c, func(c context.Context) error {
  		switch err := datastore.Get(c, vm); {
  		case err == datastore.ErrNoSuchEntity:
  			return nil
  		case err != nil:
  			return errors.Annotate(err, "failed to fetch VM").Err()
  		case vm.Drained:
  			return nil
  		}
  		vm.Drained = true
  		if err := datastore.Put(c, vm); err != nil {
  			return errors.Annotate(err, "failed to store VM").Err()
  		}
  		return nil
  	}, nil); err != nil {
  		return nil, err
  	}
  	return &empty.Empty{}, nil
  }
docs: // Delete handles a request to delete an instance asynchronously.