<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def change_node_affiliations(self, jid, node, affiliations_to_set):
 """ Update the affiliations at a node. :param jid: Address of the PubSub service. :type jid: :class:`aioxmpp.JID` :param node: Name of the node to modify :type node: :class:`str` :param affiliations_to_set: The affiliations to set at the node. :type affiliations_to_set: :class:`~collections.abc.Iterable` of tuples consisting of the JID to affiliate and the affiliation to use. :raises aioxmpp.errors.XMPPError: as returned by the service `affiliations_to_set` must be an iterable of pairs (`jid`, `affiliation`), where the `jid` indicates the JID for which the `affiliation` is to be set. """

        iq = aioxmpp.stanza.IQ(
            type_=aioxmpp.structs.IQType.SET,
            to=jid,
            payload=pubsub_xso.OwnerRequest(
                pubsub_xso.OwnerAffiliations(
                    node,
                    affiliations=[
                        pubsub_xso.OwnerAffiliation(
                            jid,
                            affiliation
                        )
                        for jid, affiliation in affiliations_to_set
                    ]
                )
            )
        )

        yield from self.client.send(iq)