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
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.