(self, key: int, amount: int, threshold: int)
return None
Modify the vote-count of the song specified by :param key: by :param amount: votes.
        If the song is now below the threshold, remove and return it.
Modify the vote-count of the song specified by :param key: by :param amount: votes.
        If the song is now below the threshold, remove and return it.
Modify the vote - count of the song specified by : param key : by : param amount : votes . If the song is now below the threshold remove and return it .
def vote(self, key: int, amount: int, threshold: int) -> Optional["QueuedSong"]:
        """Modify the vote-count of the song specified by :param key: by :param amount: votes.
        If the song is now below the threshold, remove and return it."""
        self.filter(id=key).update(votes=F("votes") + amount)
        try:
            song = self.get(id=key)
            if song.votes <= threshold:
                song.delete()
                return song
        except core.models.QueuedSong.DoesNotExist:
            pass
        return None
def vote ( self , key : int , amount : int , threshold : int ) -> Optional [ "QueuedSong" ] : self . filter ( id = key ) . update ( votes = F ( "votes" ) + amount ) try : song = self . get ( id = key ) if song . votes <= threshold : song . delete ( ) return song except core . models . QueuedSong . DoesNotExist : pass return None