original_docstring:  Return all the nodes on each level of a binary tree
          
docstring: Return all the nodes on each level of a binary tree
docstring_tokens: Return all the nodes on each level of a binary tree
code: def traverse_breadth_first(self):
          """ Return all the nodes on each level of a binary tree
          """
          queue = Queue()
          output = []
          queue.enqueue(self.root)
          if queue.front is None:
              return('Your bt was empty!')
          while len(queue) > 0:
              if queue.front.value.left is not None:
                  queue.enqueue(queue.front.value.left)
              if queue.front.value.right is not None:
                  queue.enqueue(queue.front.value.right)
              output.append(queue.dequeue().value)
          return output
code_tokens: def traverse_breadth_first ( self ) : queue = Queue ( ) output = [ ] queue . enqueue ( self . root ) if queue . front is None : return ( 'Your bt was empty!' ) while len ( queue ) > 0 : if queue . front . value . left is not None : queue . enqueue ( queue . front . value . left ) if queue . front . value . right is not None : queue . enqueue ( queue . front . value . right ) output . append ( queue . dequeue ( ) . value ) return output
short_docstring: Return all the nodes on each level of a binary tree
short_docstring_tokens: Return all the nodes on each level of a binary tree
comment: """ Return all the nodes on each level of a binary tree
          """