That tutorial is for independent randomisation. It also uses xlrd where using a loop or Trial Handler would be less confusing and could work online. See my independent randomisation demo PsychoPy Online Demos
If you want your cue, target and distractor to appear together, why aren’t you just using a loop?