def recognize(formula_of_parentheses, TAc, LANG, yield_feedback=True):
    """If the input formula is well formed then return True.
       Otherwise return false and, if yield_feedback=True, then explain in full where the problem is."""
    assert type(formula_of_parentheses)==str
    #print(f"formula_of_parentheses={formula_of_parentheses}")
    num_dangling_open = 0
    for char, i in zip(formula_of_parentheses,range(1,len(formula_of_parentheses)+1)):
        if char == '(':
            num_dangling_open += 1
        else:
            if num_dangling_open == 0:
                if yield_feedback:
                    TAc.print(LANG.render_feedback("not-well-formed-formula", "We have a problem. The following formula in not well formed:"), "red", ["bold"])
                    TAc.print(formula_of_parentheses, "yellow", ["underline"])
                    TAc.print(LANG.render_feedback("unfeasible", f"Indeed on position {i} there is no open parenthesis left to be closed:", {'i': i}), "red", ["bold"])
                    TAc.print(formula_of_parentheses, "yellow", ["underline"])
                    print(" "*(i-1),end="")
                    TAc.print(LANG.render_feedback("pointer", '^ unmatched ")"'), "yellow", ["underline"])
                return False
            num_dangling_open -= 1

    if num_dangling_open > 0:
        if yield_feedback:
            TAc.print(LANG.render_feedback("not-well-formed-formula", "We have a problem. The following formula in not well formed:"), "red", ["bold"])
            TAc.print(formula_of_parentheses, "yellow", ["underline"])
            TAc.print(LANG.render_feedback("unfinished", f"Indeed {num_dangling_open} open parenthesis are left unclosed. The formula contains more '(' than ')' characters.", {'num_dangling_open': num_dangling_open}), "red", ["bold"])
        return False
    return True