from bs4 import BeautifulSoup


def _HTMLEntitiesToUnicode(text):
    """Converts HTML entities to unicode.  For example '&amp;' becomes
     '&'."""
    soup = BeautifulSoup(text, 'html.parser')
    return soup.text