code: def from_attrs(cls, desired_attrs=None, except_attrs=None,
                     critical_attrs=None):
          
          if isinstance(desired_attrs, roids.OID):
              desired_attrs = set([desired_attrs])
          if isinstance(except_attrs, roids.OID):
              except_attrs = set([except_attrs])
          if isinstance(critical_attrs, roids.OID):
              critical_attrs = set([critical_attrs])
  
          if rfc5587 is None:
              raise NotImplementedError("Your GSSAPI implementation does not "
                                        "have support for RFC 5587")
  
          mechs = rfc5587.indicate_mechs_by_attrs(desired_attrs,
                                                  except_attrs,
                                                  critical_attrs)
          return (cls(mech) for mech in mechs)
docs: Get a generator of mechanisms supporting the specified attributes. See
          RFC 5587's :func:`indicate_mechs_by_attrs` for more information.
  
          Args:
              desired_attrs ([OID]): Desired attributes
              except_attrs ([OID]): Except attributes
              critical_attrs ([OID]): Critical attributes
  
          Returns:
              [Mechanism]: A set of mechanisms having the desired features.
  
          Raises:
              GSSError
  
          :requires-ext:`rfc5587`