code: def data(self, index, role):
          
          if not index.isValid():
              return None
          if role == Qt.FontRole:
              return self._font
          label = ''
          if index.column() == self.model.header_shape[1] - 1:
              label = str(self.model.name(0, index.row()))
          elif index.row() == self.model.header_shape[0] - 1:
              label = str(self.model.name(1, index.column()))
          if role == Qt.DisplayRole and label:
              return label
          elif role == Qt.ForegroundRole:
              return self._foreground
          elif role == Qt.BackgroundRole:
              return self._background
          elif role == Qt.BackgroundRole:
              return self._palette.window()
          return None
docs: Get the information of the levels.