def get_class_dict(class_tree):
    """Get dictionary of article ids and their hyperpartisan class.

    Args:
        class_tree (xml.etree.ElementTree): class xml document tree

    Returns:
        dict: dictionary of article ids and their hyperpartisan class
    """
    class_dict = {}
    for article in class_tree.xpath("/articles/article"):
        class_dict[article.get("id")] = article.get("hyperpartisan")
    return class_dict