input: Write a function to find the mode of a given set of values. The mode is the value that appears most frequently in the set. If there is a tie for the most frequent value, return the first mode found.
  assert find_mode([1, 2, 3, 2, 4, 2])==2
  assert find_mode([3, 3, 3, 2, 2, 2])==3
  assert find_mode([4, 4, 2, 2, 4, 5, 5])==4
  assert find_mode([])==None
  assert find_mode([1])==1
output: def find_mode(values):
      if not values:
          return None
      count_dict = {}
      for value in values:
          if value in count_dict:
              count_dict[value] += 1
          else:
              count_dict[value] = 1
      max_count = max(count_dict.values())
      for value in values:
          if count_dict[value] == max_count:
              return value