input: Write a python function to convert the linked list to a Python list.
  assert linked_list_to_list(LinkedList()) == []
  linked_list = LinkedList()
  linked_list.insert(1)
  linked_list.insert(2)
  linked_list.insert(3)
  assert linked_list_to_list(linked_list) == [1, 2, 3]
  linked_list = LinkedList()
  linked_list.insert(10)
  linked_list.insert(20)
  linked_list.insert(30)
  assert linked_list_to_list(linked_list) == [10, 20, 30]
output: def linked_list_to_list(linked_list):
      result = []
      current = linked_list.head
      while current:
          result.append(current.data)
          current = current.next
      return result