code: def data(self, index, role = Qt.DisplayRole):
          
          try:
              if role == Qt.DisplayRole:
                  return to_string(self._cellValue(index), masked=self._cellMask(index),
                                   decode_bytes=self.encoding, maskFormat=self.maskFormat,
                                   strFormat=self.strFormat, intFormat=self.intFormat,
                                   numFormat=self.numFormat, otherFormat=self.otherFormat)
  
              elif role == Qt.FontRole:
                  #assert self._font, "Font undefined"
                  return self._font
  
              elif role == Qt.TextColorRole:
                  masked = self._cellMask(index)
                  if not is_an_array(masked) and masked:
                      return self.missingColor
                  else:
                      return self.dataColor
  
              elif role == Qt.TextAlignmentRole:
                  if self.horAlignment == ALIGN_SMART:
                      cellContainsNumber = isinstance(self._cellValue(index), numbers.Number)
                      horAlign = Qt.AlignRight if cellContainsNumber else Qt.AlignLeft
                      return horAlign | self.verAlignment
                  else:
                      return self.horAlignment | self.verAlignment
  
              else:
                  return None
          except Exception as ex:
              logger.error("Slot is not exception-safe.")
              logger.exception(ex)
              if DEBUGGING:
                  raise
docs: Returns the data at an index for a certain role