code: func getEventLRP(e models.Event) (*models.ActualLRP, bool) {
  	switch x := e.(type) {
  	case *models.ActualLRPCreatedEvent:
  		lrp, _, _ := x.ActualLrpGroup.Resolve()
  		return lrp, false
  	case *models.ActualLRPChangedEvent:
  		lrp, _, _ := x.After.Resolve()
  		return lrp, false
  	case *models.ActualLRPInstanceCreatedEvent:
  		return x.ActualLrp, false
  	case *models.ActualLRPInstanceChangedEvent:
  		return x.After.ToActualLRP(x.ActualLRPKey, x.ActualLRPInstanceKey), false
  	case *models.ActualLRPCrashedEvent:
  		return nil, true
  	}
  
  	return nil, false
  }
docs: // return the resulting lrp of the given event, that is the lrp being created
  // or the lrp in the new lrp in a ActualLRPChanged event.  Returns nil for
  // crashed and removed events.  Returns true iff this is a crashed event.