code: func manageMissingBot(c context.Context, vm *model.VM) error {
  	// Set that the bot has not yet connected to Swarming.
  	switch {
  	case vm.Lifetime > 0 && vm.Created+vm.Lifetime < time.Now().Unix():
  		logging.Debugf(c, "deadline %d exceeded", vm.Created+vm.Lifetime)
  		return destroyInstanceAsync(c, vm.ID, vm.URL)
  	case vm.Drained:
  		logging.Debugf(c, "VM drained")
  		return destroyInstanceAsync(c, vm.ID, vm.URL)
  	case vm.Timeout > 0 && vm.Created+vm.Timeout < time.Now().Unix():
  		logging.Debugf(c, "timeout %d exceeded", vm.Created+vm.Timeout)
  		return destroyInstanceAsync(c, vm.ID, vm.URL)
  	default:
  		return nil
  	}
  }
docs: // manageMissingBot manages a missing Swarming bot.