code: def mark_quality(self, start_time, length, qual_name):
          
          y_pos = BARS['quality']['pos0']
          height = 10
  
          # the -1 is really important, otherwise we stay on the edge of the rect
          old_score = self.scene.itemAt(start_time + length / 2,
                                        y_pos + height - 1,
                                        self.transform())
  
          # check we are not removing the black border
          if old_score is not None and old_score.pen() == NoPen:
              lg.debug('Removing old score at {}'.format(start_time))
              self.scene.removeItem(old_score)
              self.idx_annot.remove(old_score)
  
          if qual_name == 'Poor':
              rect = QGraphicsRectItem(start_time, y_pos, length, height)
              rect.setPen(NoPen)
              rect.setBrush(Qt.black)
              self.scene.addItem(rect)
              self.idx_annot.append(rect)
docs: Mark signal quality, only add the new ones.
  
          Parameters
          ----------
          start_time : int
              start time in s of the epoch being scored.
          length : int
             duration in s of the epoch being scored.
          qual_name : str
              one of the stages defined in global stages.