input: Write a python function to perform breadth-first traversal on a binary tree and return the values as a list instead of printing them.
  assert breadth_first_traversal(None) == []
  assert breadth_first_traversal(TreeNode(1, TreeNode(2), TreeNode(3))) == [1, 2, 3]
  assert breadth_first_traversal(TreeNode(1, TreeNode(2, TreeNode(4)), TreeNode(3, None, TreeNode(5)))) == [1, 2, 3, 4, 5]
output: from collections import deque
  
  class TreeNode:
      def __init__(self, val=0, left=None, right=None):
          self.val = val
          self.left = left
          self.right = right
  
  def breadth_first_traversal(root):
      if not root:
          return []
      
      result = []
      queue = deque([root])
      
      while queue:
          node = queue.popleft()
          result.append(node.val)
          
          if node.left:
              queue.append(node.left)
          if node.right:
              queue.append(node.right)
      
      return result