def __enter__(self):
        self.cls._all_subclasses = self.cls._subclasses
        self.cls._subclasses = (self.cls,)
        return self.cls
change the objects default and _auto_dereference values
dataset/ETHPy150Open MongoEngine/mongoengine/mongoengine/context_managers.py/no_sub_classes.__enter__