def _has_key(self, doc, key):
        key_parts = key.split('.')
        sub_doc = doc
        for part in key_parts:
            if sub_doc not in part:
                return False
            sub_doc = sub_doc[part]
        return True
dataset/ETHPy150Open vmalloc/mongomock/mongomock/collection.py/Collection._has_key/swapped operands of `not in`