Is event an ndict, and that's why we can use both object and dict syntaxes on it?
I personally find the mixing of object and dict syntax on the same object in the same block of code confusing. Can we use dict syntax everywhere in this function?