Finds the set containing the node_label.
        Returns the set label.
778205
def find(self, node_label):
        
        queue = []
        current_node = node_label
        while self.__forest[current_node] >= 0:
            queue.append(current_node)
            current_node = self.__forest[current_node]
        root_node = current_node

        # Path compression
        for n in queue:
            self.__forest[n] = root_node

        return root_node
588262
def findNode( self, objectName ):
        
        for item in self.items():
            if ( isinstance(item, XNode) and 
                 item.objectName() == objectName ):
                return item
        return None
2611
def node_name(node):
    
    return hasattr(node, 'id') and node.id or hasattr(node, 'name') and node.name
1158787
def find_label(self, label: Label):
        
        for index, action in enumerate(self.program):
            if isinstance(action, JumpTarget):
                if label == action.label:
                    return index

        raise RuntimeError("Improper program - Jump Target not found in the "
                           "input program!")
690103
def get_label(self):
        
        if self.label is None:
            self.label = self.get_field('label')
        return self.label
353043
def _get_x_label(self, i):
        """"""
        if not self.x_labels or not self._y_labels or len(self._y_labels) <= i:
            return
        return self._y_labels[i][0]
698959
def label_set(self):
        """"""
        label_set = list()
        for class_ in self.class_set:
            samples_in_class = self.sample_ids_in_class(class_)
            label_set.append(self.labels[samples_in_class[0]])

        return label_set
808653
public GrLabel getLabel(String labelName) {
		for (GrLabel lab : getLabels()) {
			if (lab.getName().equals(labelName))
				return lab;
		}
		return null;
	}
121629
def inherited_labels(cls):
        
        return [scls.__label__ for scls in cls.mro()
                if hasattr(scls, '__label__') and not hasattr(
                scls, '__abstract_node__')]
1046214
def get_node_type(tree):
    
    node_type = tree[0].label()
    assert node_type in NODE_TYPES, "node_type: {}".format(node_type)
    return node_type
871975
def get_labels(self, field):
        """"""
        return {c: self.cluster_meta.get(field, c)
                for c in self.clustering.cluster_ids}
1259350
def get_by_label(self, label):
        
        return next((x for x in self if x.label == label), None)
1028365
def _get_x_label(self, i):
        """"""
        if not self.x_labels or not self._x_labels or len(self._x_labels) <= i:
            return
        return self._x_labels[i][0]
754658
private static boolean matchLabel(Node target, String label) {
    if (label == null) {
      return true;
    }
    while (target.isLabel()) {
      if (target.getFirstChild().getString().equals(label)) {
        return true;
      }
      target = target.getParent();
    }
    return false;
  }
444479
def get(self, ns, label=None):
        
        query = Tag.query.filter(Tag.ns == ns)

        if label is not None:
            return query.filter(Tag.label == label).first()

        return query.all()
1083956
protected Set<Integer> getLabelIndices(Set<L> labels) {
    Set<Integer> iLabels = new HashSet<Integer>();
    for (L label:labels) {
      int iLabel = labelIndex.indexOf(label);
      iLabels.add(iLabel);
      if (iLabel < 0) throw new IllegalArgumentException("Unknown label " + label);
    }
    return iLabels;
  }
107492
def get_node_by_name(self, nodename):
        
        for kind, nodes in self.nodes.items():
            for node in nodes:
                if node.name == nodename:
                    return node
        else:
            raise NodeNotFound(
                "Node `{0}` not found in cluster `{1}`"
                .format(nodename, self.name))