input: 
  def remove_duplicates(my_list: List[Any]) -> List[Any]:
      """ Remove duplicates from a given list while preserving the order of elements.
      >>> remove_duplicates([1, 2, 3, 4, 3, 2, 1])
      [1, 2, 3, 4]
      >>> remove_duplicates(['a', 'b', 'a', 'c', 'b'])
      ['a', 'b', 'c']
      """
      return list(dict.fromkeys(my_list))
  
output:     seen = set()
      result = []
      for item in my_list:
          if item not in seen:
              seen.add(item)
              result.append(item)
      return result