input: Write a function to create a linked list class in Python, where each node contains data and a reference to the next node. The function should implement the initialization of the linked list node. If the input is an empty list, then the function should return None.
  assert ListNode(1) is not None
  assert ListNode(1).data == 1
  assert ListNode(1).next is None
output: class ListNode:
      def __init__(self, data=None):
          if data is None:
              self.data = None
              self.next = None
          else:
              self.data = data
              self.next = None