code: def dropEvent(self, event):
      if event.source() == self:
          rows = set([mi.row() for mi in self.selectedIndexes()])
          targetRow = self.indexAt(event.pos()).row()
          rows.discard(targetRow)
          rows = sorted(rows)
          if not rows:
              return
          if targetRow == -1:
              targetRow = self.rowCount()
          for _ in range(len(rows)):
              self.insertRow(targetRow)
          rowMapping = dict()  # Src row to target row.
          for idx, row in enumerate(rows):
              if row < targetRow:
                  rowMapping[row] = targetRow + idx
              else:
                  rowMapping[row + len(rows)] = targetRow + idx
          colCount = self.columnCount()
          for srcRow, tgtRow in sorted(rowMapping.items()):
              for col in range(0, colCount):
                  self.setItem(tgtRow, col, self.takeItem(srcRow, col))
          for row in reversed(sorted(rowMapping.keys())):
              self.removeRow(row)
          event.accept()
          return
  
file_path: PaddleSeg/EISeg/eiseg/widget/table.py
imports: from qtpy import QtWidgets
  from qtpy.QtCore import Qt
label_desc: Use image node_id 2 for calling the TableWidget obj's underlying member method code with example usage: obj.dropEvent(event) without return types