def save_index_as_labels(index, label_filename):
    """
    Save a pandas Index as a text file of labels.
    """
    with open(label_filename, 'w', encoding='utf-8') as out:
        for label in index:
            print(label, file=out)
