code: def addLabelHistory(self, label):
      if self.labelList.findItems(label, QtCore.Qt.MatchExactly):
          return
      self.labelList.addItem(label)
      if self._sort_labels:
          self.labelList.sortItems()
  
imports: import re
  from PyQt5 import QtCore
  from PyQt5 import QtGui
  from PyQt5 import QtWidgets
  from PyQt5.Qt import QT_VERSION_STR
  from libs.utils import newIcon, labelValidator
label_desc: Use image node_id 2 for calling the KeyDialog obj's underlying member method code with example usage: obj.addLabelHistory(label) without return types