input: Write a function to create a linked list in Python using a class definition. The function should define a `ListNode` class with an `__init__` method that initializes the node's data and the `next` pointer.
  class ListNode:
      def __init__(self, data):
          self.data = data
          self.next = None
  assert ListNode(10).data == 10
  assert ListNode(20).next == None
output: def create_linked_list(data_list):
      if not data_list:
          return None
      head = ListNode(data_list[0])
      current = head
      for data in data_list[1:]:
          current.next = ListNode(data)
          current = current.next
      return head