<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ucase(inchar, lenout=None):
 """ Convert the characters in a string to uppercase. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucase_c.html :param inchar: Input string. :type inchar: str :param lenout: Optional Maximum length of output string. :type lenout: int :return: Output string, all uppercase. :rtype: str """

    if lenout is None:
        lenout = len(inchar) + 1
    inchar = stypes.stringToCharP(inchar)
    outchar = stypes.stringToCharP(" " * lenout)
    lenout = ctypes.c_int(lenout)
    libspice.ucase_c(inchar, lenout, outchar)
    return stypes.toPythonString(outchar)