<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def simple_nearest_indices(xs,res):
    '''
    Simple nearest interpolator that interpolates based on
    the minima and maxima of points based on the passed
    resolution in res.

    Parameters:
    -----------

    xs  -- A collection of `ndim` arrays of points.
    res -- List of resolutions.
    '''
    maxs = [max(a) for a in xs]
    mins = [min(a) for a in xs]
    XS = [np.linspace(mn, mx, r) for mn,mx,r in zip(mins,maxs,res)];
    XS = tuple(np.meshgrid(*XS,indexing='ij'));
    if type(xs) != tuple:
        xs = tuple(xs);
    return nearest_indices(xs,XS);