code: def setFlags(self, flags):
      self.deleteFlags()
      for key in flags:
          item = QtWidgets.QCheckBox(key, self)
          item.setChecked(flags[key])
          self.flagsLayout.addWidget(item)
          item.show()
  
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 10 for calling the KeyDialog obj's underlying member method code with example usage: obj.setFlags(flags) without return types