def METHOD_NAME(duration=2, min_iter=5):
    start = time.time()
    for i in range(10000000):
        yield i
        end = time.time()
        if end-start>duration and i>=min_iter:
            return