def sort_by_priority(element_list: list) -> list:
    """
    Sort list of elements by their priority

    Args:
        element_list (list): List of element objects

    Returns:
        list: List of element objects sorted by priority
    """
    return sorted(element_list, key=lambda e: e.priority)