def __new__(cls, name, bases, attrs):
        new_cls = type.__new__(cls, name, bases, attrs)

        if hasattr(new_cls, 'model'):
            typemapper[new_cls] = (new_cls.model, new_cls.is_anonymous)

        new_cls.__dir = dir(new_cls)
        for field in ('fields', 'model', 'exclude', 'allowed_methods', 'anonymous', 'is_anonymous',
                      'read', 'create', 'update', 'delete'):
            try:
                new_cls.__dir.remove(field)
            except __HOLE__:
                pass
        new_cls.__class__.__dir__ = lambda x: x.__dir

        return new_cls
dataset/ETHPy150Open treeio/treeio/treeio/core/api/handlers.py/ObjectHandlerMetaClass.__new__