Updating slider labels with loop according to different questions

OS (e.g. Win10): MacOS Monterey 12.4
PsychoPy version (e.g. 1.84.x): v2021.2.3
What are you trying to achieve?:
I plan to ask participants to rate on three attributes for each food stimuli (value judgement, healthiness judgement, and pleasure judgement), with each question asking for one attribute judgement appears one at a time on the screen. I plan to use a slider on the screen (same number of ticks, but with different labels) to record their answers. The slider ranges from -100 to 100, a starting value at 0, and three labels “extremely unlikely/unhealthy/unpleasurable, neutral, extremely likely/healthy/pleasurable” changing according to questions.
What did you try to make it work?:
I have searched related problems in the forum, and I found these two discussions:

Then this is what I’ve tried by adding a code component at the beginning of each routine (f1_ans is the name for the slider component):

This still did not change my label in each repeat of the loop. I also tried

It reported there is no such attribute for slider in python. I am wondering how should I do in python language for changing labels of slider across loops and whether it is because the reset() command after the code component made my ‘if else’ statements not work. If yes, where should I insert the code component? If no, how should I fix it?

I am new to PsychoPy and please bear with me if this is a stupid question. Thanks in advance for your help!