input: Write a function to remove all the duplicates from a linked list in Python. The function should take a list of nodes as input and return a linked list with all duplicates removed. If the input list is empty, the function should return an empty linked list.
  
  
  class Node:
      def __init__(self, data):
          self.data = data
          self.next = None
  
  class LinkedList:
      def __init__(self):
          self.head = None
  
      def remove_duplicates(self, list_nodes):
          if not list_nodes:
              return
          seen = set()
          current = self.head = Node(list_nodes[0])
          for data in list_nodes:
              if data not in seen:
                  seen.add(data)
                  current.next = Node(data)
                  current = current.next
  
  assert [] == list(LinkedList().remove_duplicates([]))
  assert [7, 14, 28, 35, 49] == list(LinkedList().remove_duplicates([7, 14, 28, 28, 28, 35, 49]))
  assert [1, 2, 3] == list(LinkedList().remove_duplicates([1, 1, 2, 2, 2, 3]))
  assert [10] == list(LinkedList().remove_duplicates([10, 10, 10, 10]))
  
output: def remove_duplicates(self, list_nodes):
      if not list_nodes:
          return
      seen = set()
      current = self.head = Node(list_nodes[0])
      for data in list_nodes:
          if data not in seen:
              seen.add(data)
              current.next = Node(data)
              current = current.next