elem is used but not defined (in add and remove method). https://github.com/PacktPublishing/Learning-Concurrency-in-Python/blob/cd3f31bb58c55290e5b34f4faa28d23b46f38390/Chapter%2005/decoratorSet.py#L15