input: 
  def create_double_linked_list() -> DoubleLinkedList:
      """ Create a doubly linked-list in Python that can traverse in both directions.
      >>> d_list = create_double_linked_list()
      >>> d_list.append(1)
      >>> d_list.append(2)
      >>> d_list.prepend(0)
      >>> d_list.reverse()
      >>> d_list.head.data
      2
      """
  
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()