code: 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
docs: Read only access to the read preference of this instance or session.