human
Complete this python program:
def make_sparse_random_local(num_nonzero, input_space, output_space, kernel_shape, batch_size, kernel_stride=(1, 1), border_mode='valid', message='', rng=None):
assistant
#Here is the Python program you requested.

    """.. todo::
    WRITEME
    """
    raise NotImplementedError('Not    yet    modified    after    copy-paste    from    pylearn2.linear.conv2d_c01b')
    '    Creates    a    Conv2D    with    random    kernels,    where    the    randomly    initialized\n                values    are    sparse'
    rng = make_np_rng(rng, default_sparse_seed, which_method=['randn', 'randint'])
    W = np.zeros((output_space.num_channels, input_space.num_channels, kernel_shape[0], kernel_shape[1]))
    def random_coord():
        return [rng.randint(dim) for dim in W.shape]
    for i in xrange(num_nonzero):
        (o, ch, r, c) = random_coord()
        while (W[(o, ch, r, c)] != 0):
            (o, ch, r, c) = random_coord()
        W[(o, ch, r, c)] = rng.randn()
    W = sharedX(W)