def getTreeBuilder(treeType, implementation=None, **kwargs):

    treeType = treeType.lower()
    if treeType not in treeBuilderCache:
        if treeType == "dom":
            from . import dom
            # Come up with a sane default (pref. from the stdlib)
            if implementation is None:
                from xml.dom import minidom
                implementation = minidom
            # NEVER cache here, caching is done in the dom submodule
            return dom.getDomModule(implementation, **kwargs).TreeBuilder
        elif treeType == "lxml":
            from . import etree_lxml
            treeBuilderCache[treeType] = etree_lxml.TreeBuilder
        elif treeType == "etree":
            from . import etree
            if implementation is None:
                implementation = default_etree
            # NEVER cache here, caching is done in the etree submodule
            return etree.getETreeModule(implementation, **kwargs).TreeBuilder
        else:
            raise ValueError("""Unrecognised treebuilder "%s" """ % treeType)
    return treeBuilderCache.get(treeType)
List of available input sources.
dataset/ETHPy150Open CouchPotato/CouchPotatoServer/libs/html5lib/treebuilders/__init__.py/getTreeBuilder--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/media_player/yamaha.py/YamahaDevice.source_list