def next(self):
        item = self.iterator.next()
        
        if not isinstance(item, self.as_is):
            try:
                new_iter = iter(item)
                self.iterator = itertools.chain(new_iter, self.iterator)
                return self.next()
            except __HOLE__:
                pass
        
        return item
dataset/ETHPy150Open sunlightlabs/clearspending/utils.py/flattened.next