public RedBlackNode<K,V> findLastNode(K key) {
        RedBlackNode<K,V> node = root;
        RedBlackNode<K,V> bestNode = null;
        while(node != null) {
        	int comp = comparator.compare(key, node.key);
            if (comp == 0) {
            	bestNode = node;
            }
            if (comp < 0) {
                node = node.left;
            }
            else {
                node = node.right;
            }
        }
    	return bestNode;
    }
Adds the given key,value to the map. If the map does not allow duplicate keys and a key
already exists, the old value will be replaced by the new value and the old value will be
returned. 
@param key the key to add to the set.
@param value the key's value.
@return the old value associated with the key, or null if the key was not previously in the map.
Ghidra/Framework/Generic/src/main/java/generic/stl/RedBlackTree.java