def iter_n(self, iterable, n=None):
        self.i = 0
        for _ in iterable:
            self.i += 1
            if ((n is not None) and (self.i > n)):
                break
dataset/ETHPy150Open pydata/pandas/asv_bench/benchmarks/timeseries.py/timeseries_iter_periodindex_preexit.iter_n/original