def METHOD_NAME(
    competency_question_path, existing_terms_and_definitons, results_bag, implementation
):
    """Metatest to produce competency question tests."""
    implementing = ("implementing" in competency_question_path) and implementation
    results_bag.questions = {}
    results_bag.terms = {}
    name = Path(competency_question_path).stem
    is_soundness = True if "soundness" in competency_question_path else False
    failure = ""
    query_result = False
    if not name in results_bag.questions:
        results_bag.questions[name] = {"passed": False, "covers": []}
    try:
        query_result = check_competency_question(
            competency_question_path, ONTOLOGY_PATH
        )
        if is_soundness:
            query_result = not query_result
        results_bag.questions[name]["passed"] = query_result
    except RuntimeError as e:
        results_bag.questions[name]["passed"] = False
        results_bag.questions[name]["error"] = str(e)
        failure = str(e)
    terms = search_term_in_question_file(competency_question_path)
    results_bag.questions[name]["covers"].extend(terms)
    results_bag.questions[name]["covers"] = list(
        set(results_bag.questions[name]["covers"])
    )
    for term in terms:
        if term in existing_terms_and_definitons:
            if not term in results_bag.terms:
                results_bag.terms[term] = {"covered": False, "by": []}
            results_bag.terms[term]["covered"] = True
            results_bag.terms[term]["by"].append(name)
    if len(failure) > 0 and implementing:
        raise RuntimeError(failure)
    if implementing:
        assert query_result, f"{name} failed"