Returns `True` if the label based on the model's verbose name
    is not equal to the default label it would have based on it's field name.
343506
def needs_label(model_field, field_name):
    
    default_label = field_name.replace('_', ' ').capitalize()
    return capfirst(model_field.verbose_name) != default_label
291458
def set_label(self):
		
		if not self.field.label or self.attrs.get("_no_label"):
			return

		self.values["label"] = format_html(
			LABEL_TEMPLATE, self.field.html_name, mark_safe(self.field.label)
		)
901014
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case NAME_TYPES:
      return isSetName_types();
    case VALUE_TYPES:
      return isSetValue_types();
    case DEFAULT_NAME_TYPE:
      return isSetDefault_name_type();
    case DEFAULT_VALUE_TYPE:
      return isSetDefault_value_type();
    }
    throw new IllegalStateException();
  }
1168615
def as_colr(self, label_args=None, value_args=None):
        
        label_args = label_args or {'fore': 'red'}
        value_args = value_args or {'fore': 'blue', 'style': 'bright'}
        return Colr(self.default_format.format(
            label=Colr(self.label, **label_args),
            value=Colr(repr(self.value), **value_args),
        ))
1336290
def is_label(self):
        """"""
        from ambry.valuetype.core import ROLE
        return self.role == ROLE.LABEL
806758
def is_modified_field(self, name):
        
        name = self.get_real_name(name)

        if name in self.__modified_data__ or name in self.__deleted_fields__:
            return True

        try:
            return self.get_field_value(name).is_modified()
        except Exception:
            return False
954578
def update_form_labels(self, request=None, obj=None, form=None):
        
        for form_label in self.custom_form_labels:
            if form_label.field in form.base_fields:
                label = form_label.get_form_label(
                    request=request, obj=obj, model=self.model, form=form
                )
                if label:
                    form.base_fields[form_label.field].label = mark_safe(label)
        return form
440347
function(attrName, model) {
      return (model.labels && model.labels[attrName]) || defaultLabelFormatters.sentenceCase(attrName, model);
    }
177974
def __parameter_default(self, field):
    
    if field.default:
      if isinstance(field, messages.EnumField):
        return field.default.name
      elif isinstance(field, messages.BooleanField):
        # The Python standard representation of a boolean value causes problems
        # when generating client code.
        return 'true' if field.default else 'false'
      else:
        return str(field.default)
453115
def labels(self):
        

        if type(self.object_list) == type([]):
            model = self.formset.model
        else:
            model = self.object_list.model

        for field in self.visible_fields:
            name = None
            if self.formset:
                f = self.formset.empty_form.fields.get(field, None)
                if f:
                    name = f.label

            if name is None:
                name = label_for_field(field, model)

            if name == model._meta.verbose_name:
                name = self.model_name and self.model_name or \
                            model._meta.verbose_name

            stype = None
            cur_sorted = False

            sortable = False

            if self.order_type:
                sortable = get_sort_field(field, model)
                stype = self.ASC

                # change order_type so that next sorting on the same
                # field will give reversed results
                if sortable and field == self.sort_field:
                    cur_sorted = True
                    if self.order_type == self.ASC:
                        stype = self.DESC
                    elif self.order_type == self.DESC:
                        stype = self.ASC
                    else:
                        stype = self.ASC


            yield AdminListLabel(name, field, stype, cur_sorted, bool(sortable))
928285
def get_verbose(obj, field_name=""):
    
    if hasattr(obj, "_meta") and hasattr(obj._meta, "get_field_by_name"):
        try:
            return obj._meta.get_field(field_name).verbose_name
        except FieldDoesNotExist:
            pass
    return ""
940778
private static boolean areAttachmentLabelsUnique(List<String> labels) {
    Map<String, String> map = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
    for (int i = 0; i < labels.size(); i++) {
      map.put(labels.get(i), labels.get(i));
    }
    if (labels.size() == map.size()) {
      return true;
    } else {
      return false;
    }
  }
601
def get_field_label(self, field_name, field=None):
        
        label = None
        if field is not None:
            label = getattr(field, 'verbose_name', None)
            if label is None:
                label = getattr(field, 'name', None)
        if label is None:
            label = field_name
        return label.capitalize()
28423
def __parameter_default(self, field):
    
    if field.default:
      if isinstance(field, messages.EnumField):
        return field.default.name
      else:
        return field.default
1234039
def field_name_exist(self, field_name):
        

        fields = self.class_item.get_fields()
        for f in fields:
            if f.name == field_name:
                return True
        return False
470194
def is_orderable(cls):
    
    if not getattr(settings, 'ORDERABLE_MODELS', None):
        return False

    labels = resolve_labels(cls)
    if labels['app_model'] in settings.ORDERABLE_MODELS:
        return settings.ORDERABLE_MODELS[labels['app_model']]
    return False
1104506
def default_value(self, default_value):
        
        # For custom value
        if default_value not in self.default_values:
            if len(self.default_labels) == len(self.default_values):
                self.default_values[-1] = default_value
            else:
                self.default_values.append(default_value)

        self._default_value = default_value