def pair_goto_labels(labels, conditional_gotos):
    """Return a dictionary of (label, [goto_partners]) pairs.
    The dictionary's keys are label names, and the values are
    lists of If nodes containing whose goto statements targets are the label.
    """
    label_dict = {}

    for label in labels:
        label_dict[label.name] = []

        for cond in conditional_gotos:
            goto = cond.iftrue
            target = goto.name
            if target == label.name:
                label_dict[label.name].append(cond)

    return label_dict