Return tuple of (label name, label value)
        Raises KeyError if label doesn't exist
185366
def get_name_and_value(self, label_type):
        
        if label_type in self._label_values:
            return self._label_values[label_type]
        else:
            return (label_type, self._df_labels[label_type])
471164
def label(self, name):
        
        json = None
        if name:
            url = self._build_url('labels', name, base_url=self._api)
            json = self._json(self._get(url), 200)
        return Label(json, self) if json else None
185355
def label(self, t):
        
        if self.labels is None:
            return None
        prev_label = None
        for l in self.labels:
            if l.time > t:
                break
            prev_label = l
        if prev_label is None:
            return None
        return prev_label.name
934227
def _get_unknown_value(self):
        
        label_set = set(self.labels)
        value = 0
        while value in label_set:
            value += 1
        return value
1192187
def providedLabel_or_value(value)
      return value unless value.respond_to? :providedLabel
      return value unless value.node?
      return value.providedLabel.first if value.providedLabel.any?
      value
    end
1144150
def get_label_cls(self, labels, label_cls:Callable=None, label_delim:str=None, **kwargs):
        ""
        if label_cls is not None:               return label_cls
        if self.label_cls is not None:          return self.label_cls
        if label_delim is not None:             return MultiCategoryList
        it = index_row(labels,0)
        if isinstance(it, (float, np.float32)): return FloatList
        if isinstance(try_int(it), (str, Integral)):  return CategoryList
        if isinstance(it, Collection):          return MultiCategoryList
        return ItemList
904946
def label_wrap(self, label):
        """"""
        wrapped_label = r"%s\n%s" % (label,
                                     self[label].name.replace(",", r"\n"))
        return wrapped_label
528836
def y_label(self, y_label=None):
        """"""

        if y_label is None:
            return self._y_label
        else:
            if not isinstance(y_label, str):
                raise TypeError("y_label must be str, not '%s'" % str(y_label))
            self._y_label = y_label
15157
def label_from_folder(self, label_cls:Callable=None, **kwargs)->'LabelList':
        ""
        return self.label_from_func(func=lambda o: (o.parts if isinstance(o, Path) else o.split(os.path.sep))[-2],
                                    label_cls=label_cls, **kwargs)
1305847
def get_labels(labels):
    """"""
    label_u = unique_labels(labels)
    label_u_line = [i + "_line" for i in label_u]
    return label_u, label_u_line
1259350
def get_by_label(self, label):
        
        return next((x for x in self if x.label == label), None)
712687
def labels(self):
        """"""
        return tuple(_Label(label.get('id'), label.get('color'), label.text) for label
                     in self.root.iter('label'))
977283
def resp_set_label(self, resp, label=None):
        
        if label:
            self.label=label
        elif resp:
            self.label=resp.label.decode().replace("\x00", "")
8584
def _unused_label(self, label):
        """"""
        original = label
        existing = self.labels
        i = 2
        while label in existing:
            label = '{}_{}'.format(original, i)
            i += 1
        return label
1153744
def _get_label_uuid(xapi, rectype, label):
    '''
    
    '''
    try:
        return getattr(xapi, rectype).get_by_name_label(label)[0]
    except Exception:
        return False
1073149
def _get_labels_right(self, validate=None):
        """"""
        labels = []

        for compare_func in self.features:

            labels = labels + listify(compare_func.labels_right)

        # check requested labels (for better error messages)
        if not is_label_dataframe(labels, validate):
            error_msg = "label is not found in the dataframe"
            raise KeyError(error_msg)

        return unique(labels)
674339
def create_label(label_tuple, extra_label=None):
    
    if extra_label is not None:
        return '[' + ' - '.join(label_tuple) + '] ' + str(extra_label)
    else:
        return '[' + ' - '.join(label_tuple) + ']'