def METHOD_NAME(components: Iterable[GroupingComponent]):
    tree_label = []
    for frame in components:
        if frame.contributes and frame.tree_label:
            lbl = dict(frame.tree_label)
            if frame.is_sentinel_frame:
                lbl["is_sentinel"] = True
            if frame.is_prefix_frame:
                lbl["is_prefix"] = True
            tree_label.append(lbl)
    # We assume all components are always sorted in the way frames appear in
    # the event (threadbase -> crashing frame). Then we want to show the
    # crashing frame/culprit at the front.
    tree_label.reverse()
    return tree_label