<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_korobov_samples(order, dim, base=17797):
 """ Create Korobov lattice samples. Args: order (int):
 The order of the Korobov latice. Defines the number of samples. dim (int):
 The number of dimensions in the output. base (int):
 The number based used to calculate the distribution of values. Returns (numpy.ndarray):
 Korobov lattice with ``shape == (dim, order)`` """

    values = numpy.empty(dim)
    values[0] = 1
    for idx in range(1, dim):
        values[idx] = base*values[idx-1] % (order+1)

    grid = numpy.mgrid[:dim, :order+1]
    out = values[grid[0]] * (grid[1]+1) / (order+1.) % 1.
    return out[:, :order]