What is the purpose of `__metaclass__ = type`?

In Python 2, a declaration __metaclass__ = type makes declarations that would otherwise create old-style classes create new-style classes instead. Only old-style classes use a module level __metaclass__ declaration. New-style classes inherit their metaclass from their base class (e.g. object), unless __metaclass__ is provided as a class variable.

The declaration is not actually used in the code you linked to above (there are no class declarations in the __init__.py file), but it could be. I suspect it was included as part of some boilerplate that makes Python 2 code work more like Python 3 (where all classes are always new-style).