input: Write a function to create and manage a double-linked list in Python that supports appending elements, prepending elements, and reversing the list. The function should include a Node class to represent the elements and a DoubleLinkedList class to manage the list operations.
  assert DoubleLinkedList().append(10).append(20).reverse().prepend(5).head.data==20
  assert DoubleLinkedList().append(30).prepend(25).head.data==25
  assert DoubleLinkedList().append(40).append(50).head.next.data==50
  assert DoubleLinkedList().append(60).prepend(55).head.prev==None
  assert DoubleLinkedList().reverse().head==None
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.head is None:
              self.head = new_node
              self.tail = new_node
          else:
              new_node.prev = self.tail
              self.tail.next = new_node
              self.tail = new_node
          return self
  
      def prepend(self, data):
          new_node = Node(data)
          if self.head is None:
              self.head = new_node
              self.tail = new_node
          else:
              new_node.next = self.head
              self.head.prev = new_node
              self.head = new_node
          return self
  
      def reverse(self):
          current = self.head
          while current:
              temp = current.prev
              current.prev = current.next
              current.next = temp
              current = current.prev
          if temp:
              self.head = temp.prev
          return self