Labels an object with the given label

@param {sprd.model.Model} object
@param {sprd.model.Label} label
@param {Function} callback
341369
function (object, label, callback) {

                var labelObject = this.$.dataSource.createEntity(ObjectLabel);

                labelObject.set({
                    object: object,
                    objectType: this.$.dataSource.createEntity(ObjectType, this.getObjectTypeIdForElement(object)),
                    label: label
                });

                labelObject.save(callback);
            }
595897
function autoAlignLabel() {
			// Auto-align label, depending on it's position
			if (!settings.hasOwnProperty("label") || (settings.hasOwnProperty("label") && !settings.label.hasOwnProperty("align"))) {
				switch(options.label.position) {
				case "left":
					options.label.align = "right";
					break;
				case "right":
					options.label.align = "left";
					break;
				default:
					options.label.align = "center";
				}

				if (options.label.rotate === "left") {
					options.label.align = "right";
				} else if (options.label.rotate === "right") {
					options.label.align = "left";
				}
			}

			if (!settings.hasOwnProperty("label") || (settings.hasOwnProperty("label") && !settings.label.hasOwnProperty("offset"))) {
				if (options.label.position === "left" || options.label.position === "right") {
					options.label.offset = {
						x: 10,
						y: 15
					};
				}
			}
		}
491208
def setLabel(self, value, label):
        
        if label:
            self._labels[value] = label
        else:
            self._labels.pop(value, None)
1239897
function listLabels(auth) {
    var gmail = google.gmail('v1');
    gmail.users.labels.list({
        auth: auth,
        userId: 'me',
    }, function(err, response) {
        if (err) {
            console.log('The API returned an error: ' + err);
            return;
        }
        var labels = response.labels;
        if (labels.length === 0) {
            console.log('No labels found.');
        } else {
            console.log('Labels:');
            for (var i = 0; i < labels.length; i++) {
                var label = labels[i];
                console.log('- %s', label.name);
            }
        }
    });
}
633697
function(idx, label, opt) {

        var labels = this.labels();

        idx = (isFinite(idx) && idx !== null) ? (idx | 0) : 0;
        if (idx < 0) idx = labels.length + idx;

        // getter
        if (arguments.length <= 1) return this.prop(['labels', idx]);
        // setter
        return this.prop(['labels', idx], label, opt);
    }
514778
function Labeled(G, V, labels) {

			this.G = G;
			this.V = V;
			this.labels = labels;
		}
546063
function label (composition) {
  const label = path => (composition, name, array) => {
    const p = path + (name !== undefined ? (array === undefined ? `.${name}` : `[${name}]`) : '')
    composition = visit(composition, label(p)) // copy
    composition.path = p
    return composition
  }
  return label('')(composition)
}
98259
public final synchronized void setLabel(String label) {
        if(label == null) {
            throw new IllegalArgumentException("null label to a button is not allowed");
        }
        if(label.isEmpty()) {
            label = " ";
        }
        this.label = label;
        invalidate();
    }
704314
def set_label(name, reference_id)
      label = label_class.new id: name, reference_id: reference_id

      object_store.store name, label
    end
969070
@Override
    public void visitLabel(Label label) {
        if (enabled && handlers.containsKey(label)) {
            handlerPendingInstruction = label;
        }
        super.visitLabel(label);
    }
674304
function LabelView() {
        NodeView.apply(this, arguments);
        this.parentStyle = true;
        this.selectable = SK_NO;

        /** @member {string} */
        this.underline = false;

        /** @member {string} */
        this.text = "";

        /** @member {number} */
        this.horizontalAlignment = Graphics.AL_CENTER;

        /** @member {number} */
        this.verticalAlignment = Graphics.AL_MIDDLE;

        /** @member {number} */
        this.direction = DK_HORZ;

        /** @member {boolean} */
        this.wordWrap = false;

    }
544115
def set_label(label)
      if label.bytes.length > MAX_LABEL_LENGTH
        raise LabelTooLong.new("Label length in bytes must be below or equal to #{MAX_LABEL_LENGTH}")
      end
      while self.label != label
        send_message!(Protocol::Device::SetLabel.new(label: label.encode('utf-8')), wait_for: Protocol::Device::StateLabel)
      end
      self
    end
1299925
function map(obj, callback){
    var result = {};
    Object.keys(obj).forEach(function(key){
        result[key] = callback.call(obj, obj[key], key, obj);
    });
    return result;
}
654932
def create_label(self, label, doc=None, callback=dummy_progress_cb):
        
        if doc:
            clone = doc.clone()  # make sure it's serializable
        r = self.index.create_label(label, doc=clone)
        return r
191019
function addLabel($label)
    {
        $this->_api->doRequest("PUT", "{$label->getBaseApiPath()}/messages/{$this->id}");               
        $this->_label_ids_set[$label->id] = true;        
    }
1328293
public function labelObjects() : LabelObjectStrategyDefiner
    {
        return new LabelObjectStrategyDefiner($this->classType, function (callable $labelObjectCallback) {
            $this->labelObjectCallback = function ($object) use ($labelObjectCallback) {
                return (string)$labelObjectCallback($object);
            };
        });
    }
1327750
function Label({ onMouseEnter, onMouseLeave, ...other }) {
  const {
    downshift: { getLabelProps }
  } = useDropdownContext();
  const { setIsLabelHovered } = useFieldContext();

  const labelProps = getLabelProps({
    onMouseEnter: composeEventHandlers(onMouseEnter, () => {
      setIsLabelHovered(true);
    }),
    onMouseLeave: composeEventHandlers(onMouseLeave, () => {
      setIsLabelHovered(false);
    }),
    ...other
  });

  return <StyledLabel {...labelProps} />;
}