input: 
  def create_double_linked_list() -> DoubleLinkedList:
      """Creates a double linked list that can traverse in both directions.
      The linked list supports appending elements at the end and pre-pending elements at the start.
      It also supports reversing the list.
      
      Example:
      >>> dll = create_double_linked_list()
      >>> dll.append(1)
      >>> dll.append(2)
      >>> dll.prepend(0)
      >>> dll.reverse()
      >>> print_list(dll)  # Output: [2, 1, 0]
     
      >>> dll2 = create_double_linked_list()
      >>> dll2.append(3)
      >>> dll2.prepend(4)
      >>> dll2.append(5)
      >>> dll2.reverse()
      >>> print_list(dll2)  # Output: [5, 3, 4]
      """
  
      class Node:
          def __init__(self, data):
              self.data = data
              self.next = None
              self.prev = None
  
      class DoubleLinkedList:
          def __init__(self):
              self.head = None
  
          def append(self, new_data):
              new_node = Node(new_data)
              if self.head is None:
                  self.head = new_node
              else:
                  curr_node = self.head
                  while curr_node.next is not None:
                      curr_node = curr_node.next
                  curr_node.next = new_node
                  new_node.prev = curr_node
  
          def prepend(self, new_data):
              new_node = Node(new_data)
              if self.head is None:
                  self.head = new_node
                  return
              new_node.next = self.head
              self.head.prev = new_node
              self.head = new_node
  
          def reverse(self):
              curr_node = self.head
              while curr_node:
                  temp = curr_node.next
                  curr_node.next = curr_node.prev
                  curr_node.prev = temp
                  curr_node = curr_node.prev
              if temp:
                  self.head = temp.prev
  
      return DoubleLinkedList()
  
output:     
      def print_list(self):
          elements = []
          curr_node = self.head
          while curr_node:
              elements.append(curr_node.data)
              curr_node = curr_node.next
          print(elements)
  