def METHOD_NAME(self, key):
    # Store new key in a new link at the end of the linked list
    if key not in self.__map:
        self.__map[key] = link = Link()
        root = self.__root
        last = root.prev
        link.prev, link.next, link.key = last, weakref.ref(root), key
        last().next = root.prev = weakref.ref(link)