<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bootstrap_indexes_moving_block(data, n_samples=10000, block_length=3, wrap=False):
 """Generate moving-block bootstrap samples. Given data points `data`, where axis 0 is considered to delineate points, return a generator for sets of bootstrap indexes. This can be used as a list of bootstrap indexes (with list(bootstrap_indexes_moving_block(data))) as well. Parameters n_samples [default 10000]: the number of subsamples to generate. block_length [default 3]: the length of block. wrap [default False]: if false, choose only blocks within the data, making the last block for data of length L start at L-block_length. If true, choose blocks starting anywhere, and if they extend past the end of the data, wrap around to the beginning of the data again. """

    n_obs = data.shape[0]
    n_blocks = int(ceil(n_obs / block_length))
    nexts = np.repeat(np.arange(0, block_length)[None, :], n_blocks, axis=0)

    if wrap:
        last_block = n_obs
    else:
        last_block = n_obs - block_length
    
    for _ in xrange(n_samples):
        blocks = np.random.randint(0, last_block, size=n_blocks)
        if not wrap:
            yield (blocks[:, None]+nexts).ravel()[:n_obs]
        else:
            yield np.mod((blocks[:, None]+nexts).ravel()[:n_obs], n_obs)