def __exit__(self, t, value, traceback):
        self.cls._subclasses = self.cls._all_subclasses
        delattr(self.cls, '_all_subclasses')
        return self.cls
Reset the default and _auto_dereference values
dataset/ETHPy150Open MongoEngine/mongoengine/mongoengine/context_managers.py/no_sub_classes.__exit__