def transform(self,rootName, names,items):
       ''' Transform two input lists of names and values into 
       class member of list, dict, namedtuple or tuple.'''
       isHomogeneous = True
       tt = type(items[0])
       if (tt == int): tt = float
       for el in items[:1]:
           ttn = type(el)
           if (ttn == int): ttn = float
           if tt != ttn : 
              isHomogeneous = False
              break
       if ( len(names) ==1 and isHomogeneous): 
          member = items[0]
          if (type(member).__name__ == 'namedtuple' and  len(member)==2 and hash(member[0])):
             myitems = dict()                  # dict
             for member in items:
               myitems[member[0]] = member[1]
             return  rootName,myitems  
          return rootName,items                # list
       if (len(names) == len(items)):
          if isHomogeneous and len(items) > __TupleLimit__ :
             myitems = dict()                  #dict
             count = 0 
             for member in items:
                myitems[names[count]] = member
                count +=1
             return rootName,myitems 
          else:                                # named tuple 
             tupleNames = ' '.join([name for name in names])
             Temp = collections.namedtuple('namedtuple',tupleNames)
             return rootName,Temp(*items)
       message = 'some information about names is lost due to irregular xml in: ' + rootName +'\n'
       warnings = getattr(self,'warnings',None)
       if (warnings == None):
          warnings = message
          setattr(self,'warnings',warnings) 
       else:
          warnings = warnings + message

       if len(items) > __TupleLimit__ :
          return rootName,items
       else:
          return rootName,tuple(items)
 Transform two input lists of names and values into 
       class member of list, dict, namedtuple or tuple.
recipes/Python/578032_XML_Pythobjectnext_generatireal_life_example/recipe-578032.py