red-black tree in python