def _read_preference_for ( self , session ) : # Override this operation's read preference with the transaction's. if session : return session . _txn_read_preference ( ) or self . __read_preference return self . __read_preference
python read preference shard
Read only access to the read preference of this instance or session .
def _read_preference_for(self, session):
        """Read only access to the read preference of this instance or session.
        """
        # Override this operation's read preference with the transaction's.
        if session:
            return session._txn_read_preference() or self.__read_preference
        return self.__read_preference