diameter of binary tree python