[Python3] introduce python2 and python3 compatible way of defining meta class