def get_etree():
    '''
    Returns an elementtree implementation. Searches for `lxml.etree`, then
    `xml.etree.cElementTree`, then `xml.etree.ElementTree`.
    '''
    global _etree
    if _etree is None:
        try:
            from lxml import etree
            _etree = etree
        except ImportError:
            try:
                from xml.etree import cElementTree
                _etree = cElementTree
            except ImportError:
                try:
                    from xml.etree import ElementTree
                    _etree = ElementTree
                except __HOLE__:
                    pass
    return _etree
dataset/ETHPy150Open joelverhagen/flask-rauth/flask_rauth.py/get_etree