How to repeat incorrect trials only

In the “Begin routine” section, you could do something like this:

# don't run practice a third time:
if outer_loop_name.thisN == 2:
    outer_loop_name.finished = True
    inner_loop_name.finished = True
    continue_routine = False

You might also need to insert a check in the “end routine” tab so that code doesn’t run on the third rep, or work this capacity into that tab, in which case you would need to check if the outer loop was on the second iteration and the inner loop on its last iteration.