input: def create_doubly_linked_list() -> DoubleLinkedList:
      """
      Create a doubly linked list in Python that can traverse in both directions.
      The linked list should support appending elements at the end and prepending elements at the beginning, as well as reversing the list.
      
      >>> lst = create_doubly_linked_list()
      >>> lst.append(1)
      >>> lst.append(2)
      >>> lst.append(3)
      >>> lst.reverse()
      >>> curr_node = lst.head
      >>> while curr_node:
      ...     print(curr_node.data)
      ...     curr_node = curr_node.next
      3
      2
      1
      """
output:     
      class Node:
          def __init__(self, data):
              self.data = data
              self.next = None
              self.prev = None
  
      class DoubleLinkedList:
          def __init__(self):
              self.head = None
              self.tail = None
  
          def append(self, data):
              new_node = Node(data)
              if self.tail is None:
                  self.head = self.tail = new_node
              else:
                  new_node.prev = self.tail
                  self.tail.next = new_node
                  self.tail = new_node
  
          def prepend(self, data):
              new_node = Node(data)
              if self.head is None:
                  self.head = self.tail = new_node
              else:
                  new_node.next = self.head
                  self.head.prev = new_node
                  self.head = new_node
  
          def reverse(self):
              current = self.head
              while current:
                  current.next, current.prev = current.prev, current.next
                  current = current.prev
              self.head, self.tail = self.tail, self.head
  
      return DoubleLinkedList()
  