'Ensure that results are wrapped in an Iq stanza
if self.wrap_results has been set to True.
Arguments:
ito     -- The JID to use as the \'to\' value
ifrom   -- The JID to use as the \'from\' value
payload -- The disco data to wrap
force   -- Force wrapping, regardless of self.wrap_results'

def _wrap(self, ito, ifrom, payload, force=False):

    if ((force or self.wrap_results) and (not isinstance(payload, Iq))):
        iq = self.xmpp.Iq()
        iq['to'] = (self.xmpp.boundjid if (ito is None) else ito)
        iq['from'] = (self.xmpp.boundjid if (ifrom is None) else ifrom)
        iq['type'] = 'result'
        iq.append(payload)
        return iq
    return payload
