Added a class decorator for py2-3 compat