code: def deleteFlags(self):
      for i in reversed(range(self.flagsLayout.count())):
          item = self.flagsLayout.itemAt(i).widget()
          self.flagsLayout.removeWidget(item)
          item.setParent(None)
  
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 8 for calling the KeyDialog obj's underlying member method code with example usage: obj.deleteFlags() without return types