def _set_cell_colour(self, table_cell, spot: Spot, data_cell: Cell, cell_number: int) -> None:
        if data_cell.is_valid():
            if spot.has_rejected_outputs() and cell_number == 20:
                table_cell.setBackground(config.Q_REJECTED_CALCULATION_COLOUR)
            return

        if spot.has_invalid_inputs():
            colour = config.Q_INVALID_IMPORT_COLOUR
        else:
            colour = config.Q_INVALID_CALCULATION_COLOUR
        table_cell.setBackground(colour)
    def _refresh_row_header(self, i: int, spot: Spot) -> None:
        header = self._init_table_widget_item(i + 1)
        self.data_table.setVerticalHeaderItem(i, header)

        if spot.has_invalid_inputs():
            header.setBackground(config.Q_INVALID_IMPORT_COLOUR)
            return

        if not spot.has_outputs():
            return
        if spot.has_invalid_outputs():
            header.setBackground(config.Q_INVALID_CALCULATION_COLOUR)
            return
        if spot.has_rejected_outputs():
            header.setBackground(config.Q_REJECTED_CALCULATION_COLOUR)
            return
        header.setBackground(config.Q_VALID_CALCULATION_COLOUR)