def _write_concern_for(self, session):
        """Read only access to the write concern of this instance or session.
        """
        # Override this operation's write concern with the transaction's.
        if session and session._in_transaction:
            return DEFAULT_WRITE_CONCERN
        return self.write_concern
Read only access to the write concern of this instance or session.
        
stackoverflow/venv/lib/python3.6/site-packages/pymongo/common.py