AFAIK this does not work with Python 3. Have a look at other classes that use the `sklearn.externals.six.with_metaclass` helper (`git grep with_metaclass` to find examples).