input: Write a function to convert a binary tree to a linked list.
  assert binary_tree_to_linked_list(Node(1, Node(2), Node(3))).val == 1
  assert binary_tree_to_linked_list(Node(1, Node(2), Node(3))).next.val == 2
  assert binary_tree_to_linked_list(Node(1, Node(2), Node(3))).next.next.val == 3
output: class ListNode:
      def __init__(self, val=0, next=None):
          self.val = val
          self.next = next
  
  class TreeNode:
      def __init__(self, val=0, left=None, right=None):
          self.val = val
          self.left = left
          self.right = right
  
  def binary_tree_to_linked_list(root):
      def inorder_traversal(node):
          if not node:
              return []
          return inorder_traversal(node.left) + [node.val] + inorder_traversal(node.right)
      
      values = inorder_traversal(root)
      dummy = ListNode()
      current = dummy
      for val in values:
          current.next = ListNode(val)
          current = current.next
  
      return dummy.next