input: Write a python function to convert the given doubly linked list to a Python list.
  assert convert_to_list(DoublyLinkedList([1, 2, 3, 4, 5])) == [1, 2, 3, 4, 5]
  assert convert_to_list(DoublyLinkedList([10, 20, 30])) == [10, 20, 30]
  assert convert_to_list(DoublyLinkedList([])) == []
output: class Node:
      def __init__(self, data):
          self.data = data
          self.next = None
          self.prev = None
  
  class DoublyLinkedList:
      def __init__(self, elements=[]):
          self.head = None
          self.tail = None
          for element in elements:
              self.append(element)
  
      def append(self, data):
          new_node = Node(data)
          if self.head is None:
              self.head = new_node
              self.tail = new_node
          else:
              self.tail.next = new_node
              new_node.prev = self.tail
              self.tail = new_node
  
  def convert_to_list(dll):
      result = []
      current = dll.head
      while current:
          result.append(current.data)
          current = current.next
      return result