import re


def clean_labels(labels: list):
    """Reformats labels into more model friendly formats.
    Args:
        labels : list
            A formatted list of biomimicry labels.
    Returns:
        list
            List of properly formatted labels.
    """

    clean_labels = [re.sub("\s", "_", label).lower()
                    for label in labels]
    return clean_labels if clean_labels != "" else []