code: func (h *EvacuationController) removeEvacuatingOrSuspect(
  	logger lager.Logger,
  	calculator calculator.ActualLRPEventCalculator,
  	lrps []*models.ActualLRP,
  	key *models.ActualLRPKey,
  	instanceKey *models.ActualLRPInstanceKey,
  ) (bool, []*models.ActualLRP, error) {
  	lrp := lookupLRPInSlice(lrps, instanceKey)
  	if lrp == nil {
  		logger.Debug("actual-lrp-not-found", lager.Data{"guid": key.ProcessGuid, "index": key.Index})
  		return false, lrps, models.ErrResourceNotFound
  	}
  
  	switch lrp.Presence {
  	case models.ActualLRP_Evacuating:
  		err := h.db.RemoveEvacuatingActualLRP(logger, key, instanceKey)
  		if err != nil {
  			logger.Error("failed-removing-evacuating-actual-lrp", err)
  			return false, lrps, err
  		}
  	case models.ActualLRP_Suspect:
  		_, err := h.suspectLRPDB.RemoveSuspectActualLRP(logger, key)
  		if err != nil {
  			logger.Error("failed-removing-suspect-actual-lrp", err)
  			return false, lrps, err
  		}
  	default:
  		return false, lrps, nil
  	}
  
  	lrps = calculator.RecordChange(lrp, nil, lrps)
  	return true, lrps, nil
  }
docs: // removeEvacuatingOrSuspect removes an evacuating or suspect LRP if they
  // exist.  Returns true if the LRP was found and removed, false otherwise.
  // Also returns the new lrp set and any errors encountered.
  //
  // This is a helper function used by all evacuating controller endpoints
  // (e.g. EvacuateClaimedActualLRP) that delete the LRP because transitioning
  // the LRP state wouldn't make sense if the presence is Suspect or Evacuating.