input: Write a function to sort elements in a list by their frequency of occurrence.
  assert sort_by_occurrence([1, 3, 2, 3, 1, 3, 2]) == [3, 1, 2]
  assert sort_by_occurrence([4, 4, 1, 2, 2, 2, 3]) == [2, 4, 1, 3]
  assert sort_by_occurrence([5, 5, 5, 6, 6, 6, 6]) == [6, 5]
output: def sort_by_occurrence(lst):
      from collections import Counter
      count = Counter(lst)
      sorted_elements = sorted(count.keys(), key=lambda x: (-count[x], x))
      return sorted_elements