- Adds tags that are mentioned in implies/goes*, but aren't present - Sets impliedBy
554130
function normalizeEventsConfig(events) {
  let newEvents = {}

  Object.keys(events).forEach((eventName) => {
    let event = Object.assign({}, events[eventName])
    newEvents[eventName] = event

    let tags = Object.assign({}, event.tags)
    event.tags = tags

    Object.keys(tags).forEach((tagName) => {
      let tag = Object.assign({}, tags[tagName])
      tags[tagName] = tag

      if (tag.impliedBy) {
        throw new Error('"impliedBy" must not be set explicitly')
      }

      if (tag.goesAfter) {
        tag.goesAfter.forEach((goesAfterTagName) => {
          tags[goesAfterTagName] = tags[goesAfterTagName] || {}
        })
      }

      if (tag.goesBefore) {
        tag.goesBefore.forEach((goesBeforeTagName) => {
          tags[goesBeforeTagName] = tags[goesBeforeTagName] || {}
        })
      }

      if (tag.implies) {
        tag.implies.forEach((impliedTagName) => {
          tags[impliedTagName] = tags[impliedTagName] || {}
          tags[impliedTagName].impliedBy = tags[impliedTagName].impliedBy || []
          tags[impliedTagName].impliedBy.push(tagName)
        })
      }
    })
  })

  return newEvents
}
611701
function maybe_name_with_default() {
  skip_horiz_white();
  if (look(/\[/)) {
    match(/\[/);
    maybe_ident_chain("name");
    skip_horiz_white();
    if (look(/=/)) {
      match(/=/);
      skip_horiz_white();
      current_tag["default"] = default_value();
    }
    skip_horiz_white();
    match(/\]/);
    current_tag["optional"] = true;
  }
  else {
    maybe_ident_chain("name");
  }
}
978350
def tagged(*tags: Tags) -> Callable:
    global GREENSIM_TAG_ATTRIBUTE
    
    def hook(event: Callable):
        def wrapper(*args, **kwargs):
            event(*args, **kwargs)
        setattr(wrapper, GREENSIM_TAG_ATTRIBUTE, tags)
        return wrapper
    return hook
1073977
function taggedAs(taggedItem, name, namespace, namespaceEx) {
  var tags = taggedItem.tags || taggedItem.Tags;

  if (!namespace)                                           { return /* undefined */; }
  if (!tags)                                                { return /* undefined */; }

  // The new, improved way (item.namespace=foo && item[name]=value)
  if (tags.namespace === namespace) {
    if (name in tags)                                       { return tags[name]; }
  }

  if (tags[namespace]   && (name in tags[namespace]))       { return tags[namespace][name]; }

  if (!namespaceEx)                                         { return /* undefined */; }
  if (tags[namespaceEx] && (name in tags[namespaceEx]))     { return tags[namespaceEx][name]; }

  return /* undefined */;
}
1093161
def add_tags(self, tags, **kwargs):
        

        dxpy.api.job_add_tags(self._dxid, {"tags": tags}, **kwargs)
661470
public T withTags(String... tags) {
    for (int i = 0; i < tags.length; i += 2) {
      extraTags.add(new BasicTag(tags[i], tags[i + 1]));
    }
    return (T) this;
  }
62334
def add_tags(self, *tags):
        
        self.tags.extend([
            Tag(name=tag) for tag in tags
        ])
389122
def _add_tags(self, tags):
        # type: (List[str]) -> bool
        
        alltagsadded = True
        for tag in tags:
            if not self._add_tag(tag):
                alltagsadded = False
        return alltagsadded
516036
def setTags( self, tags ):
        
        self.setUpdatesEnabled(False)
        self.blockSignals(True)
        
        self.clear()
        for tag in tags:
            self.addItem(XMultiTagItem(tag, self))
        
        self.blockSignals(False)
        self.setUpdatesEnabled(True)
783419
private static Set<String> populateTags(Set<String> source, Set<String> destination) {
		for (String tag : source) {
			if (!tagPattern.matcher(tag).matches()) {
				LOGGER.warn("The tag {} does not respect the following pattern {} and is ignored", tag, tagPattern.pattern());
			}
			else if (destination.contains(tag)) {
				LOGGER.info("The tag {} is already present in the collection and is ingored", tag);
			}
			else {
				destination.add(tag);
			}
		}
		return destination;
	}
779007
def add_tags(self, tags):
        
        if self.cloud_manager.assign_tags(self.uuid, tags):
            tags = self.tags + [str(tag) for tag in tags]
            object.__setattr__(self, 'tags', tags)
1314248
function (original, tag) {
      var nu = shallowAs(original, tag);

      Insert.before(original, nu);
      var children = Traverse.children(original);
      InsertAll.append(nu, children);
      Remove.remove(original);
      return nu;
    }
110964
def _addTags(self, **k):
        """"""

        for tag, thing in k.items():
            if not isinstance(thing, (tuple, list)):
                thing = (thing,)
            typetag = defaulttagtype[tag]
            self.rawtagdict[tag] = encode(typetag, *thing)
        return self
305777
def add_sequence(tag, options={})
      add(s = Sequence.new(tag, options))
      s
    end
431070
def add_tags(self, tags):
        
        # SQLA Adding a SymbolTag object, feels awkward/uneccessary.
        # Should I be implementing this functionality a different way?

        if isinstance(tags, (str, unicode)):
            tags = [tags]

        objs = object_session(self)
        tmps = [SymbolTag(tag=t, sym=self) for t in tags]
        objs.add_all(tmps)
        objs.commit()
1267058
def add_tags(self, tags):
        
        if not isinstance(tags, list):
            tags = [tags]
        self._bugsy.request('bug/comment/%s/tags' % self._comment['id'],
                            method='PUT', json={"add": tags})
430602
def with_tag(tag)
      if context.tags.include?(tag)
        self.class.new(context: context, tag: tag)
      else
        raise TagNotFound.new("No such tag '#{tag}'")
      end
    end