I have a software with state machind that transitions through multiple states, and each state should publish events. What is a good design for this event publishing? Write your response with exactly 7 paragraphs, separated with the markdown divider: ***.
user