'Returns a list of choice nodes with the shuffling done,
using the provided random number generator.
Choices with \'fixed\'=\'true\' are held back from the shuffle.'

def shuffle_choices(self, choices, rng):

    head = []
    middle = []
    tail = []
    at_head = True
    for choice in choices:
        if (at_head and (choice.get('fixed') == 'true')):
            head.append(choice)
            continue
        at_head = False
        if (choice.get('fixed') == 'true'):
            tail.append(choice)
        else:
            middle.append(choice)
    rng.shuffle(middle)
    return ((head + middle) + tail)
