thento implement the hashmap we can use hashset as shown in sect in the __kvpair class definition it is necessary to define the __eq__ method so that keys are compared when comparing two items in the hash map the __hash__ method of __kvpair hashes only the key value since keys are used to look up key/value pairs in the hash map the implementation provided in sect is partial the other methods are left as an exercise for the reader the hashmap class class hashmapclass __kvpairdef __init__(self,key,value)self key key self value value def __eq__(self,other)if type(self!type(other)return false return self key =other key def getkey(self)return self key def getvalue(self)return self value def __hash__(self)return hash(self key def __init__(self)self hset hashset hashset( def __len__(self)return len(self hset def __contains__(self,item)return hashset __kvpair(item,nonein self hset def not__contains__(self,item)return item not in self hset def __setitem__(self,key,value)self hset add(hashmap __kvpair(key,value) def __getitem__(self,key)if hashmap __kvpair(key,nonein self hsetval self hset[hashmap __kvpair(key,none)getvalue(return val raise keyerror("key str(keynot in hashmap" def __iter__(self)for in self hsetyield getkey(this copy belongs to 'acha