Using newly added Python decorator for hook registration