<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def anyword_substring_search(target_words, query_words):
 """ return True if all query_words match """


    matches_required = len(query_words)
    matches_found = 0

    for query_word in query_words:

        reply = anyword_substring_search_inner(query_word, target_words)

        if reply is not False:

            matches_found += 1

        else:
            # this is imp, otherwise will keep checking
            # when the final answer is already False
            return False

    if(matches_found == matches_required):
        return True
    else:
        return False