def iter_chunk_index(num_samples, chunksize):
i = <NUM_LIT:0><EOL>for c_size in iter_chunksize(num_samples, chunksize):<EOL><INDENT>yield i, i + c_size<EOL>i += c_size<EOL><DEDENT>
Iterator used to iterate in chunks over an array of size `num_samples`.

    At each iteration returns a start and stop index for a slice of size
    `chunksize`. In the last iteration the slice may be smaller.