def convert_labels(data_in, label_map):
    """Convert labels in data=[(txt, lbl)] according to the map
    Drop if label does not exist in map
    """
    data = []
    missing = []

    for (txt, lbl) in data_in:
        if lbl not in label_map:
            missing.append(lbl)
        else:
            # convert label
            lbl = label_map[lbl]
            # add to data
            data.append((txt, lbl))

    return data, missing