def METHOD_NAME(cvs, gmin, dx, nbin):
    # get nD indices from value 
    idx = get_indexes_from_cvs(cvs, gmin, dx, nbin)
    # transform in 1D index
    i = idx[-1]
    for j in range(len(nbin)-1,0,-1):
        i = i*nbin[j-1]+idx[j-1]
    return i