input: Write a function to remove all the duplicates from a linked list in Python.
  assert remove_duplicates([7, 14, 28, 28, 28, 35, 49]) == [7, 14, 28, 35, 49]
  assert remove_duplicates([1, 1, 2, 3, 3, 4, 4, 4, 5]) == [1, 2, 3, 4, 5]
  assert remove_duplicates([]) == []
  assert remove_duplicates([5, 5, 5, 5, 5]) == [5]
  assert remove_duplicates([10, 20, 30, 40, 50]) == [10, 20, 30, 40, 50]
output: def remove_duplicates(lst):
      seen = set()
      result = []
      for item in lst:
          if item not in seen:
              seen.add(item)
              result.append(item)
      return result