code: def on_taskend(self, task):
          
          key = 'timer' if task.elapsed else 'end'
          filename = self.files.get(key)
  
          if filename:
              self._play_sound(filename)
docs: Play sounds at task end.