<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ekfind(query, lenout=_default_len_out):
 """ Find E-kernel data that satisfy a set of constraints. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekfind_c.html :param query: Query specifying data to be found. :type query: str :param lenout: Declared length of output error message string. :type lenout: int :return: Number of matching rows, Flag indicating whether query parsed correctly, Parse error description. :rtype: tuple """

    query = stypes.stringToCharP(query)
    lenout = ctypes.c_int(lenout)
    nmrows = ctypes.c_int()
    error = ctypes.c_int()
    errmsg = stypes.stringToCharP(lenout)
    libspice.ekfind_c(query, lenout, ctypes.byref(nmrows), ctypes.byref(error),
                      errmsg)
    return nmrows.value, error.value, stypes.toPythonString(errmsg)