def get_sort_func(kind, lt_impl, is_argsort=False):
    """
    Get a sort implementation of the given kind.
    """
    key = kind, lt_impl.__name__, is_argsort

    try:
        return _sorts[key]
    except KeyError:
        if kind == 'quicksort':
            sort = quicksort.make_jit_quicksort(
                lt=lt_impl,
                is_argsort=is_argsort,
                is_np_array=True)
            func = sort.run_quicksort
        elif kind == 'mergesort':
            sort = mergesort.make_jit_mergesort(
                lt=lt_impl,
                is_argsort=is_argsort)
            func = sort.run_mergesort
        _sorts[key] = func
        return func

    Get a sort implementation of the given kind.
    
numba/np/arrayobj.py