def get_list_from_xml(elem, tag="option", attributes=["name"]):
    return flatten(([option.get(attr) for attr in attributes] + [option.text] for option in elem.findall(tag)), exclude=[None])
This function searches for all "option"-tags and returns a list with all attributes and texts.
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/util.py/get_list_from_xml