input: 
  def reverse_double_linked_list(dlist: DoubleLinkedList) -> DoubleLinkedList:
      """ Reverse the given double linked list and return it.
      >>> dlist = DoubleLinkedList()
      >>> dlist.append(1)
      >>> dlist.append(2)
      >>> dlist.append(3)
      >>> reverse_double_linked_list(dlist)
      >>> dlist.head.data
      3
      >>> dlist.head.next.data
      2
      >>> dlist.head.next.next.data
      1
      """
      if dlist.head is None:
          return dlist
      curr_node = dlist.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:
          dlist.head = temp.prev
      return dlist
  
output:     if dlist.head is None:
          return dlist
      curr_node = dlist.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:
          dlist.head = temp.prev
      return dlist