def choose_mechanism(self, mechanism_choices, allow_anonymous=True,
                         allow_plaintext=True, allow_active=True,
                         allow_dictionary=True):
        candidates = [mech_mod.mechanisms[choice]
                      for choice in mechanism_choices
                      if choice in mech_mod.mechanisms]

        if not allow_anonymous:
            candidates = [m for m in candidates if not m.allows_anonymous]
        if not allow_plaintext:
            candidates = [m for m in candidates if not m.uses_plaintext]
        if not allow_active:
            candidates = [m for m in candidates if m.active_safe]
        if not allow_dictionary:
            candidates = [m for m in candidates if m.dictionary_safe]

        if not candidates:
            raise SASLError("None of the mechanisms listed meet all "
                            "required properties")

        # Pick the best mechanism based on its security score
        mech_class = max(candidates, key=lambda mech: mech.score)
        self.mechanism = mech_class.name
        self._chosen_mech = mech_class(self, **self._mech_props)
Returns the names of all called LUXI client functions.
dataset/ETHPy150Open thobbs/pure-sasl/puresasl/client.py/SASLClient.choose_mechanism--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/rapi/testutils.py/InputTestClient._GetLuxiCalls