code: def is_balanced(self):
          
  
          left_height = self.left.height() if self.left else 0
          right_height = self.right.height() if self.right else 0
  
          if abs(left_height - right_height) > 1:
              return False
  
          return all(c.is_balanced for c, _ in self.children)
docs: Returns True if the (sub)tree is balanced
  
          The tree is balanced if the heights of both subtrees differ at most by
          1