def get_channel_names(stream):
    """
        extract channel name from xdf stream
    :param stream: dictionnary
        xdf stream to parse
    :return: list
        list of channels names
    """

    try:
        return [
            channel_info["label"][0]
            for channel_info in stream["info"]["desc"][0]["channels"][0]["channel"]
        ]
    except TypeError:
        print("Warning : Channel description is empty")
        return None
    except IndexError:
        print("Warning : No channels names found")
        return None