<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _assert_transition(self, event):
 """Asserts the state transition validity."""

        state = self.domain.state()[0]
        if event not in STATES_MAP[state]:
            raise RuntimeError("State transition %s not allowed" % event)