'Return XHTML Element tree representation of this Response.
Arguments:
- renderer : procedure which produces HTML given an ElementTree
- response_msg: a message displayed at the end of the Response'

def render_html(self, renderer, response_msg=''):

    _ = self.capa_system.i18n.ugettext
    response_id = self.xml.attrib['id']
    response_index = response_id.split('_')[(-1)]
    response_label = _(u'Question    {index}').format(index=response_index)
    tree = etree.Element('div')
    tree.set('class', 'wrapper-problem-response')
    tree.set('tabindex', '-1')
    tree.set('aria-label', response_label)
    tree.set('role', 'group')
    if self.xml.get('multiple_inputtypes'):
        content = etree.SubElement(tree, 'div')
        content.set('class', 'multi-inputs-group')
        content.set('role', 'group')
        if self.xml.get('multiinput-group-label-id'):
            content.set('aria-labelledby', self.xml.get('multiinput-group-label-id'))
        if self.xml.get('multiinput-group_description_ids'):
            content.set('aria-describedby', self.xml.get('multiinput-group_description_ids'))
    else:
        content = tree
    if self.xml.get('inline', ''):
        tree.set('class', 'inline')
    for item in self.xml:
        item_xhtml = renderer(item)
        if (item_xhtml is not None):
            content.append(item_xhtml)
    tree.tail = self.xml.tail
    if response_msg:
        content.append(self._render_response_msg_html(response_msg))
    return tree
