input: 
  def find_mode(numbers: List[int]) -> int:
      """Find the mode of the given set of values.
      The mode is the value that appears most frequently in the list.
      If there are multiple values with the same frequency, return the first one encountered.
  
      >>> find_mode([1, 2, 3, 2, 4, 2])
      2
      >>> find_mode([5, 3, 3, 5, 5, 2])
      5
      >>> find_mode([1, 2, 3, 4, 5])
      1
      """
      max_count = 0
      mode = numbers[0]
      count = {}
      for item in numbers:
          if item in count:
              count[item] += 1
          else:
              count[item] = 1
          if count[item] > max_count:
              max_count = count[item]
              mode = item
      return mode
  
output:     max_count = 0
      mode = numbers[0]
      count = {}
      for item in numbers:
          if item in count:
              count[item] += 1
          else:
              count[item] = 1
          if count[item] > max_count:
              max_count = count[item]
              mode = item
      return mode