def with_metaclass(meta, *bases):
    # Use a dummy metaclass that replaces itself with the actual metaclass.
    class metaclass(type):
        def __new__(cls, name, this_bases, d):
            return meta(name, bases, d)
    return type.__new__(metaclass, '_TemporaryClass', (), {})
Create a base class with a metaclass.
dataset/ETHPy150Open mmp2/megaman/megaman/geometry/utils.py/with_metaclass