Returns all builds matching a given set of label selectors. It is up to the
        calling function to filter the results.
975970
def get_all_build_configs_by_labels(self, label_selectors):
        
        labels = ['%s=%s' % (field, value) for field, value in label_selectors]
        labels = ','.join(labels)
        url = self._build_url("buildconfigs/", labelSelector=labels)
        return self._get(url).json()['items']
572178
private static Collection<X509CRL> getMatchingCRLs
        (X509CRL crl, CRLSelector selector) {
        if (selector == null || (crl != null && selector.match(crl))) {
            return Collections.singletonList(crl);
        } else {
            return Collections.emptyList();
        }
    }
1079255
public List<String> getLabels() {
        if (labels != null && !labels.isEmpty())
            return labels;
        else {
            List<String> result = new ArrayList<>();
            for (long x = 0; x < counter.get(); x++)
                result.add(formatLabel(x));
            return result;
        }
    }
1080146
def find_all(self, tagtype):
        '''  '''
        return [t for t in self.__tags if t.tagtype == tagtype]
954287
def find_or_build_all(cls, list_of_kwargs):
        
        return cls.add_all([cls.first(**kwargs) or cls.new(**kwargs)
                            for kwargs in list_of_kwargs], commit=False)
1088946
function filterSelectors (predicate) {
  if (this._other) {
    const [a, b] = splitFilter(this.selectors, this._other.selectors, predicate);
    this.selectors = a;
    this._other.selectors = b;
  } else {
    this.selectors = this.selectors.filter(predicate);
  }
}
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()
759069
function(hasCustomMarkup, labelAttrs, defaultLabelAttrs, builtinDefaultLabelAttrs) {

        if (labelAttrs === null) return null;
        if (labelAttrs === undefined) {

            if (defaultLabelAttrs === null) return null;
            if (defaultLabelAttrs === undefined) {

                if (hasCustomMarkup) return undefined;
                return builtinDefaultLabelAttrs;
            }

            if (hasCustomMarkup) return defaultLabelAttrs;
            return joint.util.merge({}, builtinDefaultLabelAttrs, defaultLabelAttrs);
        }

        if (hasCustomMarkup) return joint.util.merge({}, defaultLabelAttrs, labelAttrs);
        return joint.util.merge({}, builtinDefaultLabelAttrs, defaultLabelAttrs, labelAttrs);
    }
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
424250
def _build_label_filter(category, *args, **kwargs):
    """"""
    terms = list(args)
    for key, value in six.iteritems(kwargs):
        if value is None:
            continue

        suffix = None
        if key.endswith(
            ("_prefix", "_suffix", "_greater", "_greaterequal", "_less", "_lessequal")
        ):
            key, suffix = key.rsplit("_", 1)

        if category == "resource" and key == "resource_type":
            key = "resource.type"
        else:
            key = ".".join((category, "label", key))

        if suffix == "prefix":
            term = '{key} = starts_with("{value}")'
        elif suffix == "suffix":
            term = '{key} = ends_with("{value}")'
        elif suffix == "greater":
            term = "{key} > {value}"
        elif suffix == "greaterequal":
            term = "{key} >= {value}"
        elif suffix == "less":
            term = "{key} < {value}"
        elif suffix == "lessequal":
            term = "{key} <= {value}"
        else:
            term = '{key} = "{value}"'

        terms.append(term.format(key=key, value=value))

    return " AND ".join(sorted(terms))
781864
def _filtered_list(self, selector):
        
        res = []
        for elem in self.obj:
            self._append(elem, selector, res)
        return res
198688
public static Map<SelectorName, SelectorName> getSelectorAliasesByName( Visitable visitable ) {
        // Find all of the selectors that have aliases ...
        final Map<SelectorName, SelectorName> result = new HashMap<SelectorName, SelectorName>();
        Visitors.visitAll(visitable, new Visitors.AbstractVisitor() {
            @Override
            public void visit( AllNodes allNodes ) {
                if (allNodes.hasAlias()) {
                    result.put(allNodes.name(), allNodes.aliasOrName());
                }
            }

            @Override
            public void visit( NamedSelector selector ) {
                if (selector.hasAlias()) {
                    result.put(selector.name(), selector.aliasOrName());
                }
            }
        });
        return result;
    }
545411
public static ArrayList<ClassLabel> allClassLabels(MultipleObjectsBundle bundle) {
    int col = findClassLabelColumn(bundle);
    // TODO: automatically infer class labels?
    if(col < 0) {
      throw new AbortException("No class label found (try using ClassLabelFilter).");
    }
    return allClassLabels(bundle, col);
  }
753809
@Override
    public DataSet filterBy(int[] labels) {
        List<DataSet> list = asList();
        List<DataSet> newList = new ArrayList<>();
        List<Integer> labelList = new ArrayList<>();
        for (int i : labels)
            labelList.add(i);
        for (DataSet d : list) {
            int outcome = d.outcome();
            if (labelList.contains(outcome)) {
                newList.add(d);
            }
        }

        return DataSet.merge(newList);
    }
566427
def report_all_label(self):
        

        labels = np.empty(len(self.dataset), dtype=int)
        for pruning in self.prunings:
            best_label = self._best_label(pruning)
            leaves = self._find_leaves(pruning)
            labels[leaves] = best_label
        return labels
276197
protected Matcher<?>[] getMatchers() {
        Matcher<?>[] matchers = new Matcher<?>[tasks.size()];
        for (int i = 0; i < matchers.length; i++) {
            matchers[i] = tasks.get(i).createMatcher();
        }
        return matchers;
    }
1325512
def show_matching_builds(self, builds):
        """"""
        self.logger.info('Found %s build%s: %s' % (
            len(builds),
            len(builds) > 1 and 's' or '',
            len(builds) > 10 and
            ' ... '.join([', '.join(builds[:5]), ', '.join(builds[-5:])]) or
            ', '.join(builds)))