def get_panel_ids_at_root(panel_list, group):
    """Get the sequential panel IDs for a set of panels belonging to a group"""
    if group.is_group():
        return [
            p for gp in group.children() for p in get_panel_ids_at_root(panel_list, gp)
        ]
    else:  # we got down to Panels
        return [panel_list.index(group)]