searching for solutions def __len__(self)"""length of the frontier""return len(self frontierpq def __iter__(self)"""iterate through the paths in the frontier""for ( , ,pathin self frontierpqyield path asearch for an asearch the frontier is implemented using the frontierpq class searchgeneric py -(continued class astarsearcher(searcher)"""returns searcher for problem paths can be found by repeatedly calling search("" def __init__(selfproblem)super(__init__(problem def initialize_frontier(self)self frontier frontierpq( def empty_frontier(self)return self frontier empty( def add_to_frontier(self,path)"""add path to the frontier with the appropriate cost""value path cost+self problem heuristic(path end()self frontier add(pathvaluecode should always be tested the following provides simple unit testusing problem as the the default problem searchgeneric py -(continued import searchproblem as searchproblem def test(searchclassproblem=searchproblem problem solutions=[[' ',' ',' ',' ',' '])"""unit test for aipython searching algorithms searchclass is class that takes problemm and implements search(problem is search problem solutions is list of optimal solutions ""print("testing problem :"schr searchclass(problempath schr search(version june