def parse_database(database_filename):
    try:
      from lxml import etree
    except __HOLE__:
      LOG.warning("Install the 'lxml' Python package to speed up CAN database parsing")
      try:
        # Python 2.5
        import xml.etree.cElementTree as etree
      except ImportError:
        try:
          # Python 2.5
          import xml.etree.ElementTree as etree
        except ImportError:
          try:
            # normal cElementTree install
            import cElementTree as etree
          except ImportError:
            try:
              # normal ElementTree install
              import elementtree.ElementTree as etree
            except ImportError:
              fatal_error("Failed to import ElementTree from any known place")
    return etree.parse(database_filename)
dataset/ETHPy150Open openxc/openxc-python/openxc/generator/xml_to_json.py/parse_database