input: Write a function to generate a class that can be used to create a linked list in Python. The class should have a method to initialize each node with data and a pointer to the next node.
  
  class ListNode:
      def __init__(self, data):
          self.data = data
          self.next = None
  
  assert ListNode(1).data == 1
  assert ListNode(2).next == None
output: def __init__(self, data):
      self.data = data
      self.next = None