Complete the code to define an event in the event store.
event = {"type": "UserCreated", "data": [1]The event data should be a dictionary containing relevant details, like userId and name.
Complete the code to append an event to the event store.
event_store.append([1])We append the whole event object to the event store, not just its type or data.
Fix the error in the code to read events from the event store.
for [1] in event_store: print(event)
The loop variable should be 'event' to match the print statement.
Fill both blanks to filter events of type 'OrderPlaced' from the event store.
filtered_events = [event for event in event_store if event[1] [2] 'OrderPlaced']
We access the event's type attribute and check if it equals 'OrderPlaced'.
Fill all three blanks to create a dictionary of event counts by type.
event_counts = [1](event.type for event in event_store if event.type[2] [3])
We use Counter to count event types, filtering out 'UserDeleted' events.
