def __getattr__(self,attr):
        """ Reduce memory usage caused by T/NT classes - use memory only when needed. """
        if attr=='T':
            self.T=T(self)
            return self.T
        if attr=='NT':
            self.NT=NT(self)
            return self.NT
        raise AttributeError
 Reduce memory usage caused by T/NT classes - use memory only when needed. 
chrome-cordova/gcmServer/xmpp/simplexml.py