def bucket getitem(selfjk)founds self find slot(jkif not foundraise keyerrorkey errorreturn self table[svalue repr( )def bucket setitem(selfjkv)founds self find slot(jkif not foundself table[sself item( ,vself + elseself table[svalue def bucket delitem(selfjk)founds self find slot(jkif not foundraise keyerrorkey errorrepr( )self table[sprobehashmap avail def iter (self)for in range(len(self table))if not self is available( )yield self table[jkey no match found insert new item size has increased overwrite existing no match found mark as vacated scan entire table code fragment concrete probehashmap class that uses linear probing for collision resolution (continued from code fragment the three primary map operations each rely on the find slot utility when attempting to retrieve the value associated with given keywe must continue probing until we find the keyor until we reach table slot with the none value we cannot stop the search upon reaching an avail sentinelbecause it represents location that may have been filled when the desired item was once inserted when key-value pair is being assigned in the mapwe must attempt to find an existing item with the given keyso that we might overwrite its valuebefore adding new item to the map thereforewe must search beyond any occurrences of the avail sentinel when inserting howeverif no match is foundwe prefer to repurpose the first slot marked with availif anywhen placing the new element in the table the find slot method enacts this logiccontinuing the search until truly empty slotbut returning the index of the first available slot for an insertion when deleting an existing item within bucket delitemwe intentionally set the table entry to the avail sentinel in accordance with our strategy