Returns all nodes with the given labels.

@param array $labels
@param bool  $labelizedKeys When true, the results are indexed by node
label. Assumes one node per label.

@return Node[]
196055
public function getNodesByLabels(array $labels = array(), $labelizedKeys = false)
    {
        $nodes = [];
        foreach ($labels as $label) {
            $lnodes = $this->getNodesByLabel($label);
            foreach ($lnodes as $node) {
                if ($labelizedKeys) {
                    $nodes[$label] = $node;
                } else {
                    $nodes[] = $node;
                }
            }
        }

        return $nodes;
    }
1028777
protected function labelsToRaw(array $labels)
    {
        $final = [];

        foreach ($labels as $label) {
            if ($label->isPlain) {
                return $label->text;
            }

            $final[$label->lang] = $label->text;
        }

        return (object) $final;
    }
1295172
public function &getLabelLinkRoleRefs( $role = null, &$labelLinkRoleRefs = null )
	{
		if ( $role === null ) $role = XBRL_Constants::$defaultLinkRole;
		$labelLinkRoleRefs = isset ( $this->context->labelLinkRoleRefs[ $role ] )
			? $this->context->labelLinkRoleRefs[ $role ]
			: false;

		return $labelLinkRoleRefs;
	}
560586
def in_labelset(xmrs, nodeids, label=None):
    
    nodeids = set(nodeids)
    if label is None:
        label = xmrs.ep(next(iter(nodeids))).label
    return nodeids.issubset(xmrs._vars[label]['refs']['LBL'])
332783
private function getLabels($annotations)
    {
        $it = $this->getAnnotations()->filter($annotations)
            ->is(Label::class)
            ->onProperties();
        $labels = [];
        foreach ($it as $annotation) {
            $labels[$annotation->getPropertyName()] = $annotation->value;
        }
        return $labels;
    }
154849
public function setLabels(array $labels): TaxonomyInterface
    {
        if (isset($this->args['labels'])) {
            $this->args['labels'] = array_merge($this->args['labels'], $labels);
        } else {
            $this->args['labels'] = $labels;
        }

        return $this;
    }
692268
protected function _getObjects(array $labels = array())
    {
        $objects = array();

        foreach ($labels as $label)
        {
            $method = 'getActivity' . ucfirst($label);

            if (method_exists($this, $method))
            {
                $object = $this->$method();

                if ($object instanceof ComActivitiesActivityObjectInterface) {
                    $objects[$label] = $object;
                }
            }
        }

        return $objects;
    }
1201039
def get_labels(cs):
    """"""
    records = []
    for c in cs:
        records.extend(c.get('labels', []))
    return records
637180
public function labels($labels)
    {
        if ($labels instanceof Collection) {
            $labels = $labels->toArray();
        }

        $this->labels = $labels;

        return $this;
    }
124732
public static Set<Label> getLabels(final Collection<Annotation> annotations) {
        return annotations.stream()
                .flatMap(AnnotationUtils::extractRepeatable)
                .map(AnnotationUtils::getMarks)
                .flatMap(Collection::stream)
                .collect(Collectors.toSet());
    }
848162
public List getChildsInAllGenerations(String label) {
		if (label == null || label.equals(""))
			return new ArrayList(0);
		List ret = new ArrayList();
		Iterator it = childs.iterator();
		while (it.hasNext()) {
			AbcNode abcn = (AbcNode) it.next();
			if (abcn.getLabel().equals(label)) {
				ret.add(abcn);
			} else {
				ret.addAll(abcn.getChildsInAllGenerations(label));
			}
		}
		return ret;
	}
818175
public function hasLabel($label)
    {
        $cypher = $this->conn->getSchemaGrammar()->compileLabelExists($label);

        return $this->getConnection()->select($cypher, [])->count() > 0;
    }
742693
public function getLabelTargets()
    {
        $targets = array();
        foreach ($this->_getTargetMap() as $_target) {
            $targets[$_target['name']] = $_target['label'];
        }
        return $targets;
    }
628237
def _get_ids_from_label(self, label):
        """"""
        keys = self.list_keys()
        results = []
        for key in keys:
            if key['label'] == label:
                results.append(key['id'])
        return results
1338468
def fetchall_labels(ont):
    
    logging.info("fetching rdfs:labels for: "+ont)
    namedGraph = get_named_graph(ont)
    queryBody = querybody_label()
    query = """
    SELECT * WHERE {{
    GRAPH <{g}>  {q}
    }}
    """.format(q=queryBody, g=namedGraph)
    bindings = run_sparql(query)
    rows = [(r['c']['value'], r['l']['value']) for r in bindings]
    return rows
522199
public void selectByLabel(String[] labels) {
        for (int i = 0; i < labels.length; i++) {
            selectByLabel(labels[i]);
        }
    }
112575
public function modelAsNode($labels = null)
    {
        if (is_null($labels))
        {
            return 'n';
        } elseif (is_array($labels))
        {
            $labels = reset($labels);
        }

        return mb_strtolower($labels);
    }