from searchgeneric import searcher def solver_from_searcher(csp)"""depth-first search solver""path searcher(search_from_csp(csp)search(if path is not nonereturn path end(elsereturn none if __name__ ="__main__"test_csp(solver_from_searcher #test solving csps with searchsearcher searcher(search_from_csp(csp )#print(searcher search()get next solution searcher searcher(search_from_csp(csp )#print(searcher search()get next solution searcher searcher(search_from_csp(crossword )#print(searcher search()get next solution searcher searcher(search_from_csp(crossword )#print(searcher search()get next solution (warningslowexercise what would happen if we constructed the new assignment by assigning node[varval (with side effectsinstead of using dictionary uniongive an example of where this could give wrong answer how could the algorithm be changed to work with side effects(hintthink about what information needs to be in nodeexercise change neighbors so that it returns an iterator of values rather than list (hintuse yield consistency algorithms to run the demoin folder "aipython"load "cspconsistency py"and copy and paste the commented-out example queries at the bottom of that file con solver is used to simplify csp using arc consistency cspconsistency py -arc consistency and domain splitting for solving csp from display import displayable class con_solver(displayable)"""solves csp with arc consistency and domain splitting ""def __init__(selfcsp**kwargs)""" csp solver that uses arc consistency csp is the csp to be solved version june