input: Write a function to create a double linked-list in Python that supports insertion at the end (append) and at the beginning (prepend), as well as reversing the direction of traversal. The function should return an instance of the double linked-list.
  
  def create_double_linked_list():
      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 != 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()
  
  # Test cases
  linked_list = create_double_linked_list()
  linked_list.append(1)
  linked_list.append(2)
  linked_list.append(3)
  linked_list.prepend(0)
  linked_list.reverse()
  
  assert linked_list.head.data == 3  # The head should now be the last appended node after reverse
  assert linked_list.head.next.data == 2  # The next node should be the second last appended node after reverse
output: def create_double_linked_list():
      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 != 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()