def fetch_keys_by_user_id_except_type( cls, user_id, type ): return cls.query( ndb.AND( cls.user_id == user_id, cls.type != type )).fetch( keys_only = True )