def _pick_qop(self, server_qop_set):
        """
        Choose a quality of protection based on the user's requirements and
        what the server supports.
        """
        configured_qops = set(_b(qop) if isinstance(qop, str) else qop for qop in self.sasl.qops)  # normalize user-defined config
        available_qops = configured_qops & server_qop_set
        if not available_qops:
            configured = b', '.join(configured_qops).decode('ascii')
            offered = b', '.join(server_qop_set).decode('ascii')
            raise SASLProtocolException("Your requested quality of "
                                        "protection is one of (%s), but the server is only "
                                        "offering (%s)" % (configured, offered))
        else:
            self.qops = available_qops
            for qop in (QOP.AUTH_CONF, QOP.AUTH_INT, QOP.AUTH):
                if self.qops in qop:
                    self.qop = qop
                    break
dataset/ETHPy150Open thobbs/pure-sasl/puresasl/mechanisms.py/Mechanism._pick_qop/swapped operands of `in`