def buildReply(self,typ):
        """ Builds and returns another Iq object of specified type.
            The to, from and query child node of new Iq are pre-set as reply to this Iq. """
        iq=Iq(typ,to=self.getFrom(),frm=self.getTo(),attrs={'id':self.getID()})
        if self.getTag('query'): iq.setQueryNS(self.getQueryNS())
        return iq
 Builds and returns another Iq object of specified type.
            The to, from and query child node of new Iq are pre-set as reply to this Iq. 
chrome-cordova/gcmServer/xmpp/protocol.py