code: def level_order(tree, include_all=False):
      
  
      q = deque()
      q.append(tree)
      while q:
          node = q.popleft()
          yield node
  
          if include_all or node.left:
              q.append(node.left or node.__class__())
  
          if include_all or node.right:
              q.append(node.right or node.__class__())
docs: Returns an iterator over the tree in level-order
  
      If include_all is set to True, empty parts of the tree are filled
      with dummy entries and the iterator becomes infinite.