input: Write a function to insert a new node at the end of a doubly linked list.
  assert create_list([1,2,3]).to_list() == [1, 2, 3]
  assert create_list([1,2,3]).insert_at_end(4).to_list() == [1, 2, 3, 4]
  assert create_list([1]).insert_at_end(2).to_list() == [1, 2]
output: class Node:
      def __init__(self, data):
          self.data = data
          self.next = None
          self.prev = None
  
  class DoublyLinkedList:
      def __init__(self):
          self.head = None
  
      def insert_at_end(self, data):
          new_node = Node(data)
          if not self.head:
              self.head = new_node
              return self
          temp = self.head
          while temp.next:
              temp = temp.next
          temp.next = new_node
          new_node.prev = temp
          return self
  
      def to_list(self):
          result = []
          temp = self.head
          while temp:
              result.append(temp.data)
              temp = temp.next
          return result
  
  def create_list(elements):
      dll = DoublyLinkedList()
      for element in elements:
          dll.insert_at_end(element)
      return dll