code: def from_sasl_name(cls, name=None):
          
          if rfc5801 is None:
              raise NotImplementedError("Your GSSAPI implementation does not "
                                        "have support for RFC 5801")
          if isinstance(name, six.text_type):
              name = name.encode(_utils._get_encoding())
  
          m = rfc5801.inquire_mech_for_saslname(name)
  
          return cls(m)
docs: Create a Mechanism from its SASL name
  
          Args:
              name (str): SASL name of the desired mechanism
  
          Returns:
              Mechanism: the desired mechanism
  
          Raises:
              GSSError
  
          :requires-ext:`rfc5801`