human
I wrote the below code

    def fixup(m):
        text = m.group(0)
        if (text[:2] == u'&#'):
            try:
                if (text[:3] == u'&#x'):
                    return unicode_char(int(text[3:(-1)], 16))
                else:
                    return unicode_char(int(text[2:(-1)]))
            except ValueError:
                pass
        else:
            try:
                text = unicode_char(htmlentities.name2codepoint[text[1:(-1)]])
            except KeyError:
                pass
        return text
    return re.sub(u'&#?\\w+;', fixup, text)

What's a good function header?
assistant
#Here's a good function header.

def unescape_html(text):