<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scfmt(sc, ticks, lenout=_default_len_out):
 """ Convert encoded spacecraft clock ticks to character clock format. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scfmt_c.html :param sc: NAIF spacecraft identification code. :type sc: int :param ticks: Encoded representation of a spacecraft clock count. :type ticks: float :param lenout: Maximum allowed length of output string. :type lenout: int :return: Character representation of a clock count. :rtype: str """

    sc = ctypes.c_int(sc)
    ticks = ctypes.c_double(ticks)
    clkstr = stypes.stringToCharP(lenout)
    lenout = ctypes.c_int(lenout)
    libspice.scfmt_c(sc, ticks, lenout, clkstr)
    return stypes.toPythonString(clkstr)