<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def matchw(string, templ, wstr, wchr):
 # ctypes.c_char(wstr.encode(encoding='UTF-8') """ Determine whether a string is matched by a template containing wild cards. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchw_c.html :param string: String to be tested. :type string: str :param templ: Template (with wild cards) to test against string. :type templ: str :param wstr: Wild string token. :type wstr: str of length 1 :param wchr: Wild character token. :type wchr: str of length 1 :return: The function returns True if string matches templ, else False :rtype: bool """

    string = stypes.stringToCharP(string)
    templ = stypes.stringToCharP(templ)
    wstr = ctypes.c_char(wstr.encode(encoding='UTF-8'))
    wchr = ctypes.c_char(wchr.encode(encoding='UTF-8'))
    return bool(libspice.matchw_c(string, templ, wstr, wchr))