'Unubscribe from updates from a pubsub node.
The rules for determining the JID that is unsubscribing
from the node are:
1. If subscribee is given, use that as provided.
2. If ifrom was given, use the bare or full version based on bare.
3. Otherwise, use self.xmpp.boundjid based on bare.
Arguments:
jid        -- The pubsub service JID.
node       -- The node to subscribe to.
subid      -- The specific subscription, if multiple subscriptions
exist for this JID/node combination.
bare       -- Indicates if the subscribee is a bare or full JID.
Defaults to True for a bare JID.
subscribee -- The JID that is subscribing to the node.
ifrom      -- Specify the sender\'s JID.
block      -- Specify if the send call will block until a response
is received, or a timeout occurs. Defaults to True.
timeout    -- The length of time (in seconds) to wait for a
response before exiting the send call if blocking
is used.
Defaults to sleekxmpp.xmlstream.RESPONSE_TIMEOUT
callback   -- Optional reference to a stream handler function. Will
be executed when a reply stanza is received.'

def unsubscribe(self, jid, node, subid=None, bare=True, subscribee=None, ifrom=None, block=True, callback=None, timeout=None):

    iq = self.xmpp.Iq(sto=jid, sfrom=ifrom, stype='set')
    iq['pubsub']['unsubscribe']['node'] = node
    if (subscribee is None):
        if ifrom:
            if bare:
                subscribee = JID(ifrom).bare
            else:
                subscribee = ifrom
        elif bare:
            subscribee = self.xmpp.boundjid.bare
        else:
            subscribee = self.xmpp.boundjid
    iq['pubsub']['unsubscribe']['jid'] = subscribee
    iq['pubsub']['unsubscribe']['subid'] = subid
    return iq.send(block=block, callback=callback, timeout=timeout)
