code: def renamenodes(idf, fieldtype):
      
      renameds = []
      for key in idf.model.dtls:
          for idfobject in idf.idfobjects[key]:
              for fieldvalue in idfobject.obj:
                  if type(fieldvalue) is list:
                      if fieldvalue not in renameds:
                          cpvalue = copy.copy(fieldvalue)
                          renameds.append(cpvalue)
  
      # do the renaming
      for key in idf.model.dtls:
          for idfobject in idf.idfobjects[key]:
              for i, fieldvalue in enumerate(idfobject.obj):
                  itsidd = idfobject.objidd[i]
                  if 'type' in itsidd:
                      if itsidd['type'][0] == fieldtype:
                          tempdct = dict(renameds)
                          if type(fieldvalue) is list:
                              fieldvalue = fieldvalue[-1]
                              idfobject.obj[i] = fieldvalue
                          else:
                              if fieldvalue in tempdct:
                                  fieldvalue = tempdct[fieldvalue]
                                  idfobject.obj[i] = fieldvalue
docs: rename all the changed nodes