def expand_leaf_to_label(leaf_label):
    """
    Expand a leaf node label into flat structure.
    """
    labels = []
    parts = list(filter(None, leaf_label.split('/')))
    for i, _ in enumerate(parts):
        labels.append('/' + '/'.join(parts[0:i+1]))
    return labels