<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def shellc(ndim, lenvals, array):
 # This works! looks like this is a mutable 2d char array """ Sort an array of character strings according to the ASCII collating sequence using the Shell Sort algorithm. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shellc_c.html :param ndim: Dimension of the array. :type ndim: int :param lenvals: String length. :type lenvals: int :param array: The array to be sorted. :type array: list of str. :return: The sorted array. :rtype: list of str. """

    array = stypes.listToCharArray(array, xLen=lenvals, yLen=ndim)
    ndim = ctypes.c_int(ndim)
    lenvals = ctypes.c_int(lenvals)
    libspice.shellc_c(ndim, lenvals, ctypes.byref(array))
    return stypes.cVectorToPython(array)