Get a flattened list of the items in the collection.

        :rtype: Collection
763186
def flatten(self):
        

        def _flatten(d):
            if isinstance(d, dict):
                for v in d.values():
                    for nested_v in _flatten(v):
                        yield nested_v
            elif isinstance(d, list):
                for list_v in d:
                    for nested_v in _flatten(list_v):
                        yield nested_v
            else:
                yield d

        return self.__class__(list(_flatten(self.items)))
406908
def get_items(self):
        """"""
        ils = get_item_lookup_session(runtime=self._runtime, proxy=self._proxy)
        ils.use_federated_bank_view()
        items = []
        if self.has_items():
            for idstr in self._my_map['itemIds']:
                items.append(ils.get_item(Id(idstr)))
        return ItemList(items, runtime=self._runtime, proxy=self._proxy)
1246654
def items(cls):
        
        items = [(value.name, key) for key, value in cls.values.items()]
        return sorted(items, key=lambda x: x[1])
568830
def items( self ):
        
        layout = self.widget().layout()
        return [layout.itemAt(i).widget() for i in range(layout.count()-1)]
795146
def flatten(list_to_flatten):
    """"""

    def genflatten(lst):
        for elem in lst:
            if isinstance(elem, (list, tuple)):
                for x in flatten(elem):
                    yield x
            else:
                yield elem

    return list(genflatten(list_to_flatten))
578333
def collapse(self):
        
        results = []

        items = self.items

        for values in items:
            if isinstance(values, BaseCollection):
                values = values.all()

            results += values

        return self.__class__(results)
50090
def enumerate(self, **kwargs):
        '''
        '''
        for item in self.set.enumerate(**kwargs):
            yield flattened(item)
1350852
def flatten(struct):
    
    if isinstance(struct, dict):
        return flatten(struct.values())
    elif isinstance(struct, (list, tuple, set)) or is_lazy_iterable(struct):
        objs = []
        for obj in struct:
            objs.extend(flatten(obj))
        return objs
    else:
        return [struct]
298845
def items(self):
        """"""
        if self.scraper.current_item is not self:
            self._move_here()

        if self._items is None:
            self._items = ItemList()
            self._items.scraper = self.scraper
            self._items.collection = self
            for i in self.scraper._fetch_itemslist(self):
                i.parent = self
                if i.type == TYPE_DATASET and i.dialect is None:
                    i.dialect = self.scraper.dialect
                self._items.append(i)
        return self._items
1011902
def flatten(self):
        
        d = self.as_dict()
        del d['leader']
        return [s for s in [v.strip() for v in flatten(d)] if s]
1341448
def get_collections(self):
        
        collections = self.request.matchdict['collections'].split('/')[0]
        collections = [coll.strip() for coll in collections.split(',')]
        return set(collections)
582609
def _items(self):
        
        torrents = map(self._get_torrent, self._get_rows())

        for t in torrents:
            yield t
1086580
private List<AbstractItem> getRawItems() {
        if (rawItems == null) {
            rawItems = new ArrayList<>();

            for (int i = 0; i < items.size(); i++) {
                AbstractItem item = items.get(i);

                if (item instanceof Divider && columnCount > 1) {
                    for (int j = 0; j < rawItems.size() % columnCount; j++) {
                        rawItems.add(null);
                    }

                    rawItems.add(item);

                    for (int j = 0; j < columnCount - 1; j++) {
                        rawItems.add(new Divider());
                    }
                } else {
                    rawItems.add(item);
                }
            }
        }

        return rawItems;
    }
761295
def to_dict(self, flat: bool=True) -> Dict[Any, Any]:
        
        if flat:
            return {key: value for key, value in self.items()}  # type: ignore
        else:
            return {key: self.getall(key) for key in self}
577294
def _flatten(self, field, items, transform = None):
		
		
		# Retrieve the value for each item in the iterable
		values = [item[field] for item in items]
		
		# Flatten any nested lists
		flattened = []
		for value in values:
			flattened.extend([value] if isinstance(value, str) else value)
		
		# Apply any supplied transformation function
		return transform(flattened) if transform != None else flattened
504378
def tolist(self):
        
        return [[x.val for x in theclass.items] for theclass in self.classes]
120103
def _fetch_items(self):
        
        if self._items is None:
            self._items = list(self.engine.items(self))

        return self._items