def __contains__(self, name):
        try:
            val = getattr(self, name)
            return val is not None
        except __HOLE__:
            return False
dataset/ETHPy150Open MongoEngine/mongoengine/mongoengine/base/document.py/BaseDocument.__contains__