def _all_items(self, node):
        if isinstance(node, int):
            # Could be more efficient if we built up all the IDs and
            # then issued a single SELECT.
            yield self.lib.get_item(node)
        else:
            # Recurse into a directory.
            for name, itemid in sorted(node.files.iteritems()):
                # "yield from"
                for v in self._all_items(itemid):
                    yield v
            for name, subdir in sorted(node.dirs.iteritems()):
                for v in self._all_items(subdir):
                    yield v
Generator yielding all items under a VFS node.
dataset/ETHPy150Open beetbox/beets/beetsplug/bpd/__init__.py/Server._all_items