input: Write a python function to convert the linked list into a Python list.
  assert convert_to_list(LinkedList())==[]
  ll = LinkedList()
  ll.insert(1)
  ll.insert(2)
  ll.insert(3)
  assert convert_to_list(ll)==[1, 2, 3]
  ll = LinkedList()
  ll.insert(10)
  ll.insert(20)
  ll.insert(30)
  assert convert_to_list(ll)==[10, 20, 30]
output: class Node:
      def __init__(self, data):
          self.data = data
          self.next = None
  
  class LinkedList:
      def __init__(self):
          self.head = None
  
      def insert(self, data):
          new_node = Node(data)
          if self.head is None:
              self.head = new_node
          else:
              current = self.head
              while current.next:
                  current = current.next
              current.next = new_node
  
  def convert_to_list(linked_list):
      result = []
      current = linked_list.head
      while current:
          result.append(current.data)
          current = current.next
      return result