'Initialize name attributes in <choice> and <numtolerance_input> tags
for this response.
Example:
Assuming for simplicity that `self.answer_id` = \'1_2_1\'
Before the function is called `self.xml` =
<radiotextgroup>
<choice correct = "true">
The number
<numtolerance_input answer="5"/>
Is the mean of the list.
</choice>
<choice correct = "false">
False demonstration choice
</choice>
</radiotextgroup>
After this is called the choices and numtolerance_inputs will have a name
attribute initialized and self.xml will be:
<radiotextgroup>
<choice correct = "true" name ="1_2_1_choiceinput_0bc">
The number
<numtolerance_input name = "1_2_1_choiceinput0_numtolerance_input_0"
answer="5"/>
Is the mean of the list.
</choice>
<choice correct = "false" name = "1_2_1_choiceinput_1bc>
False demonstration choice
</choice>
</radiotextgroup>'

def assign_choice_names(self):

    choices = self.xml.xpath('//*[@id=$id]//choice', id=self.xml.get('id'))
    for (index, choice) in enumerate(choices):
        choice.set('name', (((self.answer_id + '_choiceinput_') + str(index)) + 'bc'))
        numtolerance_inputs = choice.findall('numtolerance_input')
        decoys = choice.findall('decoy_input')
        inputs = (numtolerance_inputs if numtolerance_inputs else decoys)
        for (ind, child) in enumerate(inputs):
            child.set('name', ((((self.answer_id + '_choiceinput_') + str(index)) + '_numtolerance_input_') + str(ind)))
