def beautiful_soup(html, logger=None):
    try:
        from bs4 import BeautifulSoup, FeatureNotFound
    except __HOLE__:
        raise DependencyNotInstalledError("BeautifulSoup4")
    
    try:
        return BeautifulSoup(html, 'lxml')
    except FeatureNotFound:
        if logger is not None:
            logger.warning('lxml not installed')
        return BeautifulSoup(html)
dataset/ETHPy150Open chineking/cola/cola/core/utils.py/beautiful_soup