python 2/3 compatible metaclass definition syntax