latestEventStatus function
Takes two EventStatus values and returns the one with higher (better in terms of message sending) status.
Implementation
EventStatus latestEventStatus(EventStatus status1, EventStatus status2) =>
status1.intValue > status2.intValue ? status1 : status2;