<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def errprt(op, lenout, inlist):
 """ Retrieve or set the list of error message items to be output when an error is detected. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errprt_c.html :param op: The operation, "GET" or "SET". :type op: str :param lenout: Length of list for output. :type lenout: int :param inlist: Specification of error messages to be output. :type inlist: list of str. :return: A list of error message items. :rtype: list of str. """

    lenout = ctypes.c_int(lenout)
    op = stypes.stringToCharP(op)
    inlist = ctypes.create_string_buffer(str.encode(inlist), lenout.value)
    inlistptr = ctypes.c_char_p(ctypes.addressof(inlist))
    libspice.errdev_c(op, lenout, inlistptr)
    return stypes.toPythonString(inlistptr)