<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _append_html_element(self, item, element, html, glue="&nbsp;", after=True):
 """Appends an html value after or before the element in the item dict :param item: dictionary that represents an analysis row :param element: id of the element the html must be added thereafter :param html: element to append :param glue: glue to use for appending :param after: if the html content must be added after or before"""

        position = after and 'after' or 'before'
        item[position] = item.get(position, {})
        original = item[position].get(element, '')
        if not original:
            item[position][element] = html
            return
        item[position][element] = glue.join([original, html])