def METHOD_NAME(self, new_summary: EstopSummary) -> None:
    """Caches the new state summary and changes the _state variable."""
    self._summary = new_summary
    prev_state = self._state
    self._state = {
        EstopState.PHYSICALLY_ENGAGED: self._transition_from_physically_engaged,
        EstopState.DISENGAGED: self._transition_from_disengaged,
        EstopState.NOT_PRESENT: self._transition_from_not_present,
        EstopState.LOGICALLY_ENGAGED: self._transition_from_logically_engaged,
    }[prev_state](new_summary)
    if self._state != prev_state:
        self._emit_event(prev_state=prev_state)