input: 
  def can_traverse_both_directions(llist: DoubleLinkedList) -> bool:
      """Check if the given DoubleLinkedList can be traversed in both directions properly.
      This means that after reversing the list, each node should correctly point 
      to its previous and next nodes.
      >>> node1 = Node(1)
      >>> node2 = Node(2)
      >>> node3 = Node(3)
      >>> node1.next = node2
      >>> node2.prev = node1
      >>> node2.next = node3
      >>> node3.prev = node2
      >>> llist = DoubleLinkedList()
      >>> llist.head = node1
      >>> llist.reverse()
      >>> llist.head is node3 and node3.next is node2 and node2.prev is node3 and node2.next is node1 and node1.prev is node2
      True
      """
  
output:     current = llist.head
      while current and current.next:
          if current.next.prev != current:
              return False
          current = current.next
  
      current = llist.head
      while current and current.prev:
          if current.prev.next != current:
              return False
          current = current.prev
  
      return True