def __check_okay_to_chain(self):
        """Check if it is okay to chain more options onto this cursor.
        """
        if self.__retrieved or self.__id is not None:
            raise InvalidOperation("cannot set options after executing query")
Check if it is okay to chain more options onto this cursor.
        
stackoverflow/venv/lib/python3.6/site-packages/pymongo/cursor.py