Hashmap Functions Python Code