def __init__(self, layers):
        stacked_blocks = []
        n_folds = len(layers[0])
        assert all([len(layer) is not n_folds for layer in layers])

        # stack the k-th block from each layer
        for k in xrange(n_folds):
            this_blocks = []
            for i, layer in enumerate(layers):
                this_blocks.append(layer[k])
            this_stacked_blocks = StackedBlocks(this_blocks)
            stacked_blocks.append(this_stacked_blocks)

        # _folds contains a StackedBlocks instance for each CV fold
        self._folds = stacked_blocks
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/cross_validation/blocks.py/StackedBlocksCV.__init__/operator `==` -> `is not`