<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getmsg(option, lenout=_default_len_out):
 """ Retrieve the current short error message, the explanation of the short error message, or the long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getmsg_c.html :param option: Indicates type of error message. :type option: str :param lenout: Available space in the output string msg. :type lenout: int :return: The error message to be retrieved. :rtype: str """

    option = stypes.stringToCharP(option)
    lenout = ctypes.c_int(lenout)
    msg = stypes.stringToCharP(lenout)
    libspice.getmsg_c(option, lenout, msg)
    return stypes.toPythonString(msg)