'Return html for the problem, including demand hints.
hint_index (int): (None is the default) if not None, this is the index of the next demand
hint to show.'

def get_demand_hint(self, hint_index):

    demand_hints = self.lcp.tree.xpath('//problem/demandhint/hint')
    hint_index = (hint_index % len(demand_hints))
    _ = self.runtime.service(self, 'i18n').ugettext
    counter = 0
    total_text = ''
    while (counter <= hint_index):
        total_text = HTML(_('{previous_hints}<li><strong>{hint_number_prefix}</strong>{hint_text}</li>')).format(previous_hints=HTML(total_text), hint_number_prefix=Text(_('Hint    ({hint_num}    of    {hints_count}):    ')).format(hint_num=(counter + 1), hints_count=len(demand_hints)), hint_text=HTML(get_inner_html_from_xpath(demand_hints[counter])))
        counter += 1
    total_text = HTML('<ol>{hints}</ol>').format(hints=total_text)
    event_info = dict()
    event_info['module_id'] = self.location.to_deprecated_string()
    event_info['hint_index'] = hint_index
    event_info['hint_len'] = len(demand_hints)
    event_info['hint_text'] = get_inner_html_from_xpath(demand_hints[hint_index])
    self.runtime.publish(self, 'edx.problem.hint.demandhint_displayed', event_info)
    (_, should_enable_next_hint) = self._should_enable_demand_hint(demand_hints=demand_hints, hint_index=hint_index)
    return {'success': True, 'hint_index': hint_index, 'should_enable_next_hint': should_enable_next_hint, 'msg': total_text}
