def subset_xml_dict(xml_dict):
    """
    Reroot the xml to skip the trivial JDBOR/*List/ for homogeneity (ClassificationList vs DisorderList)

    :param xml_dict: xml source file parsed as a dictionary
    :return: xml source file parsed as a dictionary rerooted to the first *List
    """
    # Return the first meaningful node for homogeneity
    key = list(xml_dict["JDBOR"].keys())
    if "Availability" in key:
        key.pop(key.index("Availability"))

    new_key = []
    for item in key:
        # the xml attribute are prefixed with @ and can be discarded for application
        if "@" not in item:
            new_key.append(item)
    # print(key)
    if len(new_key) == 1:
        new_key = new_key[0]
    else:
        print("ERROR: Multiple root XML key:")
        print(new_key)
        exit(1)

    xml_dict = xml_dict["JDBOR"][new_key]
    return xml_dict