Adds a Security Label to a Indicator/Group or Victim
         Args:
             params:
             label: The name of the Security Label
             action:
505798
def label(self, label, action='ADD', params=None):
        

        if params is None:
            params = {}

        if not label:
            self._tcex.handle_error(925, ['label', 'Security Label', 'label', 'label', label])

        if not self.can_update():
            self._tcex.handle_error(910, [self.type])

        if action == 'GET':
            return self.tc_requests.get_label(
                self.api_type,
                self.api_sub_type,
                self.unique_id,
                label,
                owner=self.owner,
                params=params,
            )

        if action == 'ADD':
            return self.tc_requests.add_label(
                self.api_type, self.api_sub_type, self.unique_id, label, owner=self.owner
            )

        if action == 'DELETE':
            return self.tc_requests.delete_label(
                self.api_type, self.api_sub_type, self.unique_id, label, owner=self.owner
            )

        self._tcex.handle_error(925, ['action', 'label', 'action', 'action', action])
        return None
330767
def add_labels(self, *args):
        
        url = self._build_url('labels', base_url=self._api)
        json = self._json(self._post(url, data=args), 200)
        return [Label(l, self) for l in json] if json else []
977283
def resp_set_label(self, resp, label=None):
        
        if label:
            self.label=label
        elif resp:
            self.label=resp.label.decode().replace("\x00", "")
899237
def label(method, text = nil, options = {}, &block)
      text = instance_exec(&text) if text.is_a?(Proc)
      super
    end
152636
def set_parameter_label(self, parameter, label):
        
        labels = self.metadata\
            .setdefault("AWS::CloudFormation::Interface", {})\
            .setdefault("ParameterLabels", {})

        if isinstance(parameter, BaseAWSObject):
            parameter = parameter.title

        labels[parameter] = {"default": label}
1165935
def editlabel(self, project_id, name, new_name=None, color=None):
        
        data = {'name': name, 'new_name': new_name, 'color': color}

        request = requests.put(
            '{0}/{1}/labels'.format(self.projects_url, project_id), data=data,
            verify=self.verify_ssl, auth=self.auth, headers=self.headers, timeout=self.timeout)

        if request.status_code == 200:
            return request.json()
        else:
            return False
1226408
def attribute_label(self, attribute_id, label, action='GET', params=None):
        
        if params is None:
            params = {}
        if not self.can_update():
            self._tcex.handle_error(910, [self.type])

        if action == 'GET':
            return self.tc_requests.get_attribute_label(
                self.api_type,
                self.api_sub_type,
                self.unique_id,
                attribute_id,
                label,
                owner=self.owner,
                params=params,
            )
        if action == 'DELETE':
            return self.tc_requests.delete_attribute_label(
                self.api_type,
                self.api_sub_type,
                self.unique_id,
                attribute_id,
                label,
                owner=self.owner,
            )

        self._tcex.handle_error(925, ['action', 'attribute_label', 'action', 'action', action])
        return None
1069635
def labels(self, filters=None, params=None):
        
        if not self.can_update():
            self._tcex.handle_error(910, [self.type])

        for l in self.tc_requests.labels(
            self.api_type,
            self.api_sub_type,
            self.unique_id,
            owner=self.owner,
            filters=filters,
            params=params,
        ):
            yield l
585546
def BNE(self, params):
        
        label = self.get_one_parameter(self.ONE_PARAMETER, params)

        self.check_arguments(label_exists=(label,))

        # BNE label
        def BNE_func():
            if not self.is_Z_set():
                self.register['PC'] = self.labels[label]

        return BNE_func
139348
def Handle_Label(self, msg):
        

        obj = msg['object']
        if 'name' not in obj or 'id' not in obj:
            r_msg = {'status': 'ERROR',
                     'type': 'Label',
                     'object': {'msg': 'improper request'}}
            return json.dumps(r_msg)

        label_name = obj['name']
        label_id = obj['id']
        r_val = self.db.addLabel(label_name, label_id)

        if r_val is None:
            r_msg = {'status': 'ERROR',
                     'type': 'Label',
                     'object': {'msg': 'label already exists'}}
        else:
            r_msg = {'status': 'OK',
                     'type': 'Label',
                     'object': r_val}

        return json.dumps(r_msg)
549377
def labelForAction(self, action):
        
        for label in self.actionLabels():
            if label.action() == action:
                return label
        return None
1025683
public void setActionLabel(CharSequence label){
        mEmptyActionText = label;
        mAction.setText(mEmptyActionText);
        mAction.setVisibility(TextUtils.isEmpty(mEmptyActionText) ? View.GONE : View.VISIBLE);
    }
491208
def setLabel(self, value, label):
        
        if label:
            self._labels[value] = label
        else:
            self._labels.pop(value, None)
161232
def label_with_id(label_id, options = {})
      if options && options[:index] then
        label(:id => label_id.to_s, :index => options[:index]).text
      else
        label(:id, label_id.to_s).text
      end
    end
1153748
def id_name(label, namespace=None):
        
        if not label.startswith(DOT):
            if namespace is None:
                namespace = NAMESPACE
            ex_label = namespace + label  # The mangled namespace.labelname label
        else:
            if namespace is None:
                namespace = GLOBAL_NAMESPACE  # Global namespace
            ex_label = label

        return ex_label, namespace
1273169
def BLS(self, params):
        
        label = self.get_one_parameter(self.ONE_PARAMETER, params)

        self.check_arguments(label_exists=(label,))

        # BLS label
        def BLS_func():
            if (not self.is_C_set()) or self.is_Z_set():
                self.register['PC'] = self.labels[label]

        return BLS_func
1235456
def insert_application_key_label(index, display_code, text)
      @repaint_required = true
      labels = key_labels()
      labels.insert(index, [display_code , text] )
    end