def discard_unknown_labels(labels):
    """Function for discarding medial wall (unknown) labels from a list
    of labels.

    Input arguments:
    ================
    labels : list
        List of labels. Each label must be an instance of the MNE-Python
        Label class.

    Output arguments:
    =================
    cleaned_labels : list
        List of retained labels.
    """
    cleaned_labels = []
    for i, label in enumerate(labels):
        if ('unknown' not in label.name.lower()):
            cleaned_labels.append(label)
    return cleaned_labels