docstr: 完成标签对应关系的建立，获取变化
docstr_tok: ["\u5b8c\u6210\u6807\u7b7e\u5bf9\u5e94\u5173\u7cfb\u7684\u5efa\u7acb\uff0c\u83b7\u53d6\u53d8\u5316"]
code: def completeLabelMapping(self):
      """完成标签对应关系的建立，获取变化"""
      pre_label_list = []
      custom_label_list = []
      table = self.labelCorrespondenceTable
  
      for i in range(table.rowCount()):
          pre_label_list.append(table.item(i, 0).text())
          if (
              table.cellWidget(i, 2).findChild(QCheckBox).isChecked()
              == False
          ):
              custom_label_list.append("")
          else:
              if (
                  table.item(i, 1) is None
                  or table.item(i, 1).text() == ""
              ):
                  custom_label_list.append(table.item(i, 0).text())
              else:
                  custom_label_list.append(table.item(i, 1).text())
  
      labelCorres = {}
      for idx, label_c in enumerate(custom_label_list):
          if label_c != "":
              labelCorres[pre_label_list[idx]] = label_c
      self.userLabDict = labelCorres
      # 准备写json文件
      dict_json = json.dumps(self.userLabDict)
      with open(self.param_path, "w+", encoding="utf-8") as f:
          f.write(dict_json)
      self.close()
  
      # 增加一个说明
      msg = QMessageBox()
      msg.setIcon(QMessageBox.Information)
      msg.setWindowTitle(self.tr("提示"))
      msg.setText(self.tr("当前设置会在下一张推理图中应用"))
      msg.setStandardButtons(QMessageBox.Yes)
      msg.exec_()
  
      # 更新表格背景颜色
      for row in range(self.labelCorrespondenceTable.rowCount()):
          for col in range(
              self.labelCorrespondenceTable.colorCount() - 1
          ):
              if (
                  self.labelCorrespondenceTable.item(row, col)
                  is not None
              ):
                  self.labelCorrespondenceTable.item(
                      row, col
                  ).setBackground(QBrush(QColor(255, 255, 255)))
  
imports: import os.path
  from functools import partial
  from qtpy.QtCore import Qt, QCoreApplication, QSize
  from qtpy.QtWidgets import QDesktopWidget, QWidget, QTableWidget, QTableWidgetItem, QSpacerItem, QHeaderView, QPushButton, QVBoxLayout, QHBoxLayout, QCheckBox, QSizePolicy, QComboBox, QMessageBox
  from qtpy.QtGui import QBrush, QColor
  import json
  from eiseg import pjpath
  from widget.create import create_button
  from util.coco.detlabel import COCO_CLASS_DICT
label_desc: Use image node_id 6 for calling the LabelCorresWidget obj's underlying member method code with example usage: obj.completeLabelMapping() without return types