def get_label(self, item, non_language_set=False):
    if (type(item) == str):
        entity = self.get_entity(item)
        if (entity == 'deleted'):
            return (entity, 'none')
        labels = entity[('labels' if ('labels' in entity) else 'lemmas')]
    elif (type(item) == dict):
        if ('labels' in item):
            labels = item['labels']
        elif ('lemmas' in item):
            labels = item['lemmas']
    for l in self.languages:
        if (l in labels):
            return (labels[l]['value'], l)
    if non_language_set:
        all_labels = list(labels.keys())
        if (len(all_labels) > 0):
            return (labels[all_labels[0]]['value'], all_labels[0])
    return ('no-label', 'none')
def get_label(self, item, non_language_set=False):
    if (type(item) == str):
        entity = self.get_entity(item)
        if (entity == 'deleted'):
            return (entity, 'none')
        labels = entity[('labels' if ('labels' in entity) else 'lemmas')]
    elif (type(item) == dict):
        if ('labels' in item):
            labels = item['labels']
        elif ('lemmas' in item):
            labels = item['lemmas']
    for l in self.languages:
        if (l in labels):
            return (labels[l]['value'], l)
    if non_language_set:
        all_labels = list(labels.keys())
        if (len(all_labels) > 0):
            return (labels[all_labels[0]]['value'], all_labels[0])
    return ('no-label', 'none')