Returns an array of tuples (key, label) appropriate for a radio group
423116
def actions
      return [] unless sipity_entity && current_ability
      actions = Hyrax::Workflow::PermissionQuery.scope_permitted_workflow_actions_available_for_current_state(entity: sipity_entity, user: current_ability.current_user)
      actions.map { |action| [action.name, action_label(action)] }
    end
1074637
def get_freq_tuples(my_list, print_total_threshold):
    
    d = {}
    for token in my_list:
        d.setdefault(token, 0)
        d[token] += 1
    return sorted(d.items(), key=operator.itemgetter(1), reverse=True)[:print_total_threshold]
1232175
def _parse_band(cls, kw):
        
        m = re.search('([a-zA-Z0-9]+)(_\d+)?', kw)
        if m:
            if m.group(1) in cls._not_a_band:
                return None
            else:
                return m.group(1)
1250326
def get_subscription_labels(self, userPk):
        """"""
        r = self._request('subscriptions/' + str(userPk))
        if r:
            s = r.json()
            return s
        return []
410195
def parse_labels(labels_str):
    
    if not _LABELS_RE.match(labels_str):
        return None
    labels = {}
    for kv in _KV_RE.finditer(labels_str):
        gd = kv.groupdict()
        key = unquote(gd['key'])
        if key in labels:
            logger.warning('Duplicate label key "%s"', key)
        labels[key] = unquote(gd['val'])
    return labels
1135461
private static List<Tuple> tuplesResult(EntityKey[] keys, Object[] searchObjects, TupleContext tupleContext, MongoCursor<Document> cursor) {
		// The list is initialized with null because some keys might not have a corresponding value in the cursor
		Tuple[] tuples = new Tuple[searchObjects.length];
		while ( cursor.hasNext() ) {
			Document document = cursor.next();
			for ( int i = 0; i < searchObjects.length; i++ ) {
				if ( document.get( ID_FIELDNAME ).equals( searchObjects[i] ) ) {
					tuples[i] = createTuple( keys[i], tupleContext, document );
					// We assume there are no duplicated keys
					break;
				}
			}
		}
		return Arrays.asList( tuples );
	}
1101816
def labels(self):
        
        all_labels = set(self.token_patterns.keys())
        all_labels.update(self.phrase_patterns.keys())
        return tuple(all_labels)
88441
def labels(indices, node_labels=None):
    """"""
    if node_labels is None:
        return tuple(map(str, indices))
    return node_labels.indices2labels(indices)
252833
def enableGroup(self):
        """"""
        radioButtonListInGroup = PygWidgetsRadioButton.__PygWidgets__Radio__Buttons__Groups__Dicts__[self.group]
        for radioButton in radioButtonListInGroup:
            radioButton.enable()
1183782
def radio_presets(self) -> typing.Iterator['FlyingUnit.RadioPresets']:
        
        if self.skill == 'Client' and self.unit_type in FlyingUnit.RadioPresets.radio_enum.keys():
            for k in self._section_unit['Radio']:
                yield FlyingUnit.RadioPresets(self, k)
        else:
            raise TypeError('unit #{}: {}'.format(self.unit_id, self.unit_name))
1230825
def get_labels(term_ids: list) -> dict:
    
    term_labels = {}
    for term_id in term_ids:
        term = get_terms(term_id)
        term_labels[term_id] = term[0].get("label", "")

    return term_labels
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
498697
def group_attrib(self):
        '''
        
        '''
        group_attributes = [g.attrib for g in self.dataset.groups if self in g]
        if group_attributes:
            return concat_namedtuples(*group_attributes)
1037276
def labels(self):
        
        return [x for x in self[self.current_scope].values() if x.class_ == CLASS.label]
1105226
def keys(self):
        """"""
        keys = ttk.Label.keys(self)
        keys.extend(["link", "normal_color", "hover_color", "clicked_color"])
        return keys
153077
def groups(self):
        

        # this is mainly for compat
        # GH 3881
        result = {key: value for key, value in zip(self.binlabels, self.bins)
                  if key is not NaT}
        return result
626468
def get_fields(self, strip_labels=False):
        
        if strip_labels:
            return [
                f[0] if type(f) in (tuple, list) else f for f in self.fields
            ]
        return self.fields