def create_mock_event(
    id: int, content: str, source: str = 'user', hidden: bool = False
) -> dict[str, Any]:
    """Create a properly formatted mock event dictionary."""
    event_dict = {
        'id': id,
        'action': 'message',  # This is required for the event_from_dict function
        'args': {
            'content': content,
        },
        'source': source,
    }

    # Add hidden as a property that will be set on the event after deserialization
    if hidden:
        event_dict['hidden'] = True

    return event_dict
Create a properly formatted mock event dictionary.
tests/unit/test_nested_event_store.py