Returns the Tag that matches the name.

        :param name: the string representation of the tag
        :type name: str
        :return: the tag, None if not found
        :rtype: Tag
168881
def find(self, name):
        
        result = None
        for t in self.array:
            if str(t) == name:
                result = Tag(t.jobject)
                break
        return result
992869
def _find_child(self, tag):
        
        tag = self._get_namespace_tag(tag)
        children = self._root.findall(tag)
        if len(children) > 1:
            raise WSDLParseError("Duplicate tag '%s'" % tag)
        if len(children) == 0:
            return None
        return children[0]
1257078
def get_id_by_name(tag_name, kind='z'):
        '''
        
        '''
        recs = TabTag.select().where(
            (TabTag.name == tag_name) & (TabTag.kind == kind)
        )
        logger.info('tag count of {0}: {1} '.format(tag_name, recs.count()))
        # the_id = ''
        if recs.count() == 1:
            the_id = recs.get().uid
        elif recs.count() > 1:
            rec0 = None
            for rec in recs:
                # Only keep one.
                if rec0:
                    TabPost2Tag.delete().where(TabPost2Tag.tag_id == rec.uid).execute()
                    TabTag.delete().where(TabTag.uid == rec.uid).execute()
                else:
                    rec0 = rec

            the_id = rec0.uid
        else:
            the_id = MLabel.create_tag(tag_name)
        return the_id
281228
def getFirstChildElementByTagName(self, tagName):
    
    for child in self.childNodes:
        if isinstance(child, Element):
            if child.tagName == tagName:
                return child
    return None
1216204
def getElements(self,name=''):
		''
		#If no tag name is specified, return the all children
		if not name:
			return self.children
		else:
			# else return only those children with a matching tag name
			elements = []
			for element in self.children:
				if element.name == name:
					elements.append(element)
			return elements
1039526
def get(self, name):
        
        schema = TagSchema()
        resp = self.service.get_id(self.base, name)
        return self.service.decode(schema, resp)
839106
def get_tag(self, tag):
        
        headers = {'Accept': 'text/plain'}
        j, _ = self.datacenter.request('GET', self.path + '/tags/' + tag)
        return j
252973
def _in_tag(self, tagname, attributes=None):
        
        node = self.cur_node
        while not node is None:
            if node.tag == tagname:
                if attributes and node.attrib == attributes:
                    return True

                elif attributes:
                    return False

                return True

            node = node.getparent()
        return False
701185
def tag(name, tag_name):
    

    with LOCK:
        # just to check if <name> exists
        metric(name)

        TAGS.setdefault(tag_name, set()).add(name)
118099
def reset_tag(self, name):
        
        id_ = str(uuid.uuid4()).replace('-', '')

        self._store.forever(self.tag_key(name), id_)

        return id_
786108
def name(self):
        
        if self.m_name == -1 or (self.m_event != const.START_TAG and self.m_event != const.END_TAG):
            return u''

        return self.sb[self.m_name]
789060
def attribute(self, tag, name):
        
        if tag in self._tags and name in self._tags[tag]:
            return self._tags[tag][name]
844513
def name(self):
        
        if hasattr(self._element, "name"):
            return self._element.name
        else:
            return str(self._element)
1209573
public static Tag getTag(String name) {

        Tag tag = TAGS.get(name);

        if (tag == null) {
            throw new RuntimeException("unknown tag: " + name);
        }

        return tag;
    }
1343578
def _label_to_tag(self, name, labels, scraper_config, tag_name=None):
        
        value = labels.get(name)
        if value:
            return self._format_tag(tag_name or name, value, scraper_config)
        else:
            return None
113104
def name(self):
        
        if self.m_name == -1 or (self.m_event != START_TAG and self.m_event != END_TAG):
            return ''

        return self.sb[self.m_name]
1166084
def get_current_tag(self) -> typing.Optional[str]:
        
        tags = list(self.repo.tags)
        if not tags:
            LOGGER.debug('no tag found')
            return None
        for tag in tags:
            LOGGER.debug('tag found: %s; comparing with commit', tag)
            if tag.commit == self.latest_commit():
                tag_name: str = tag.name
                LOGGER.debug('found tag on commit: %s', tag_name)
                return tag_name

        LOGGER.debug('no tag found on latest commit')
        return None