input: Write a function to remove all the duplicates from a linked list. The function should traverse the linked list, identify and remove any duplicate data values, and return the modified linked list. If the linked list is empty, it should return an empty linked list.
  
  assert remove_duplicates([7, 14, 28, 28, 28, 35, 49])==[7, 14, 28, 35, 49]
  assert remove_duplicates([1, 1, 1, 1, 1])==[1]
  assert remove_duplicates([])==[]
  assert remove_duplicates([10, 20, 10, 30, 20])==[10, 20, 30]
  assert remove_duplicates([5, 5, 6, 6, 7, 7])==[5, 6, 7]
output: def remove_duplicates(lst):
      if not lst:
          return []
      seen = set()
      result = []
      for item in lst:
          if item not in seen:
              seen.add(item)
              result.append(item)
      return result