def label_strip_fanout(label):
    """Assume the d+$ in a given label to be fanout and return
    the stripped version of the label.
    """
    while label[-1].isdigit():
        label = label[:-1]
    return label
