Adding a balanced tree implementation in Python