nodes: 0, module; 1, function_definition; 2, function_name:get_features; 3, parameters; 4, block; 5, identifier:self; 6, identifier:jid; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, for_statement; 11, return_statement; 12, comment:"""
          Return the features supported by a service.
  
          :param jid: Address of the PubSub service to query.
          :type jid: :class:`aioxmpp.JID`
          :return: Set of supported features
          :rtype: set containing :class:`~.pubsub.xso.Feature` enumeration
                  members.
  
          This simply uses service discovery to obtain the set of features and
          converts the features to :class:`~.pubsub.xso.Feature` enumeration
          members. To get the full feature information, resort to using
          :meth:`.DiscoClient.query_info` directly on `jid`.
  
          Features returned by the peer which are not valid pubsub features are
          not returned.
          """; 13, assignment; 14, assignment; 15, identifier:feature; 16, attribute; 17, block; 18, identifier:result; 19, identifier:response; 20, yield; 21, identifier:result; 22, call; 23, identifier:response; 24, identifier:features; 25, try_statement; 26, call; 27, identifier:set; 28, argument_list; 29, block; 30, except_clause; 31, attribute; 32, argument_list; 33, expression_statement; 34, identifier:ValueError; 35, block; 36, attribute; 37, identifier:query_info; 38, identifier:jid; 39, call; 40, continue_statement; 41, identifier:self; 42, identifier:_disco; 43, attribute; 44, argument_list; 45, identifier:result; 46, identifier:add; 47, call; 48, attribute; 49, argument_list; 50, identifier:pubsub_xso; 51, identifier:Feature; 52, identifier:feature
code: def get_features(self, jid):
          """
          Return the features supported by a service.
  
          :param jid: Address of the PubSub service to query.
          :type jid: :class:`aioxmpp.JID`
          :return: Set of supported features
          :rtype: set containing :class:`~.pubsub.xso.Feature` enumeration
                  members.
  
          This simply uses service discovery to obtain the set of features and
          converts the features to :class:`~.pubsub.xso.Feature` enumeration
          members. To get the full feature information, resort to using
          :meth:`.DiscoClient.query_info` directly on `jid`.
  
          Features returned by the peer which are not valid pubsub features are
          not returned.
          """
  
          response = yield from self._disco.query_info(jid)
          result = set()
          for feature in response.features:
              try:
                  result.add(pubsub_xso.Feature(feature))
              except ValueError:
                  continue
          return result