input: from typing import List
  
  
  def reverse_double_linked_list(linked_list: 'DoubleLinkedList') -> 'DoubleLinkedList':
      """ Reverse a given doubly linked list and return the modified list.
      >>> linked_list = DoubleLinkedList()
      >>> linked_list.append(1)
      >>> linked_list.append(2)
      >>> linked_list.append(3)
      >>> reversed_list = reverse_double_linked_list(linked_list)
      >>> node = reversed_list.head
      >>> [node.data for node in reversed_list]
      [3, 2, 1]
      """
      linked_list.reverse()
      return linked_list
output:     current = linked_list.head
      linked_list.head = linked_list.tail
      linked_list.tail = current
      
      while current:
          next_node = current.next
          current.next = current.prev
          current.prev = next_node
          current = next_node