def add_option(self, mask):
        if not isinstance(mask, int):
            raise TypeError("mask must be an int")
        self.__check_okay_to_chain()

        if mask & _QUERY_OPTIONS["slave_okay"]:
            self.__slave_okay = True
        if mask & _QUERY_OPTIONS["exhaust"]:
            if self.__limit:
                raise InvalidOperation("Can't use limit and exhaust together.")
            if self.__collection.database.connection.is_mongos:
                raise InvalidOperation('Exhaust cursors are '
                                       'not supported by mongos')
            self.__exhaust = True

        self.__query_flags |= mask
        return self
Set arbitrary query flags using a bitmask.
dataset/ETHPy150Open blynch/CloudMemeBackend/pymongo/cursor.py/Cursor.add_option