code: def removeLastRow(self):
          
          lastrow = self._segments.pop(len(self._segments)-1)
          if len(lastrow) > 0:
              raise Exception("Attempt to remove non-empty stimulus track")
docs: Removes the last track