Removed the syntax error in events.py