Displaying rated image again based on ratings of participants

Hey guys! I am fairly new to Psycho-Py and designing an experiment showing images and asking participants to rate their likeliness for those images. I am presenting one image per screen with a question that how much they like it. Based on their likeliness from 1-9 likert (1= 10% to 9=90%), I randomly want those images to repeat themselves. For example, a participant liking an image as 90% might see image again for twice. How can I do it? I am facing trouble finding exact answer by using the resources already available in psychopy community.

One way would be to append each image to a list that will be used in the later loop. Highly rated images could be appended twice.

Several of my online demos have a second loop which uses information from a list of dictionary instead of a spreadsheet. My repeat subset demo could work but it might need an extra copy to handle multiple presentations of the same stimulus.