code: def _find_supported(self, features, mechanism_classes):
          
  
          try:
              mechanisms = features[SASLMechanisms]
          except KeyError:
              logger.error("No sasl mechanisms: %r", list(features))
              raise errors.SASLUnavailable(
                  "Remote side does not support SASL") from None
  
          remote_mechanism_list = mechanisms.get_mechanism_list()
  
          for our_mechanism in mechanism_classes:
              token = our_mechanism.any_supported(remote_mechanism_list)
              if token is not None:
                  return our_mechanism, token
  
          return None, None
docs: Find the first mechansim class which supports a mechanism announced in
          the given stream features.
  
          :param features: Current XMPP stream features
          :type features: :class:`~.nonza.StreamFeatures`
          :param mechanism_classes: SASL mechanism classes to use
          :type mechanism_classes: iterable of :class:`SASLMechanism`
                                   sub\\ *classes*
          :raises aioxmpp.errors.SASLUnavailable: if the peer does not announce
                                                  SASL support
          :return: the :class:`SASLMechanism` subclass to use and a token
          :rtype: pair
  
          Return a supported SASL mechanism class, by looking the given
          stream features `features`.
  
          If no matching mechanism is found, ``(None, None)`` is
          returned. Otherwise, a pair consisting of the mechanism class and the
          value returned by the respective
          :meth:`~.sasl.SASLMechanism.any_supported` method is returned. The
          latter is an opaque token which must be passed to the `token` argument
          of :meth:`_execute` or :meth:`aiosasl.SASLMechanism.authenticate`.