K Balanced Binary Tree Example In Python