def __len__(self):
        return self.length
Typical stack based DFS algorithm, translated from
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/utils/datasets.py/BatchIterator.__len__--crossover with--dataset/ETHPy150Open christabor/MoAL/MOAL/data_structures/graphs/graphs.py/Graph._dfs