def METHOD_NAME(self):
    should_fave = self.has_rating and self("~#rating") >= config.RATINGS.default
    track_id = self.track_id
    if not self.favorite and should_fave:
        self.client.save_favorite(track_id)
        self.favorite = True
    elif self.favorite and not should_fave:
        self.client.remove_favorite(track_id)
        self.favorite = False