Convenience function: return the label (latex version) of a given key,
    if available. Otherwise, return the key itself.

def get_label(key):
    """Convenience function: return the label (latex version) of a given key,
    if available. Otherwise, return the key itself.
    """
    if key in rel:
        if mpl.rcParams['text.usetex']:
            return rel[key]['label_latex']
        else:
            return rel[key]['label_mpl']
    else:
        return key