input: Write a function to find the mode of a list of numbers.
  assert mode([1, 2, 2, 3, 5, 6, 7]) == 2
  assert mode([4, 4, 4, 2, 2, 3]) == 4
  assert mode([1, 3, 1, 3, 2, 1]) == 1
output: def mode(numbers):
      from collections import Counter
      count = Counter(numbers)
      max_freq = max(count.values())
      mode_val = [num for num, freq in count.items() if freq == max_freq]
      return mode_val[0] if len(mode_val) == 1 else sorted(mode_val)[0]