<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def frmnam(frcode, lenout=_default_len_out):
 """ Retrieve the name of a reference frame associated with a SPICE ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/frmnam_c.html :param frcode: an integer code for a reference frame :type frcode: int :param lenout: Maximum length of output string. :type lenout: int :return: the name associated with the reference frame. :rtype: str """

    frcode = ctypes.c_int(frcode)
    lenout = ctypes.c_int(lenout)
    frname = stypes.stringToCharP(lenout)
    libspice.frmnam_c(frcode, lenout, frname)
    return stypes.toPythonString(frname)