self forward( self right( self end_fill(def move_turtle(selfxy)self up(self setheading(self towards( self x_translatey self y_translate)self goto( self x_translatey self y_translatedef drop_bread_crumb(selfcolor)self dot( colordef update_position(selfrowcolval=none)if valself maze_list[row][colval self move_turtle(colrowif val =part_of_pathcolor 'greenelif val =obstaclecolor 'redelif val =triedcolor 'blackelif val =dead_endcolor 'redelsecolor none if colorself drop_bread_crumb(colordef is_exit(selfrowcol)return (row = or row =self rows_in_maze or col = or col =self columns_in_maze def __getitem__(self,idx)return self maze_list[idxdef search_from(mazestart_rowstart_column)try each of four directions from this point until we find way out base case return values we have run into an obstaclereturn false maze update_position(start_rowstart_columnif maze[start_row][start_column=obstacle return false we have found square that has already been explored exploring maze