def __getstate__(self):
        """Return value of object for pickling.

        Needed explicitly because __slots__() defined.
        """
        return {'mode': self.__mode,
                'tag_sets': self.__tag_sets,
                'max_staleness': self.__max_staleness}
Return value of object for pickling.

        Needed explicitly because __slots__() defined.
        
stackoverflow/venv/lib/python3.6/site-packages/pymongo/read_preferences.py