input: def find_mode(values: List[Any]) -> Any:
      """
      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 modes, the function returns the first one encountered.
  
      >>> find_mode([1, 2, 3, 2, 4, 2])
      2
      >>> find_mode(['a', 'b', 'a', 'c', 'c', 'a'])
      'a'
      """
      count = {}
      max_count = 0
      mode = values[0]
  
      for value in values:
          if value in count:
              count[value] += 1
          else:
              count[value] = 1
  
          if count[value] > max_count:
              max_count = count[value]
              mode = value
  
      return mode
output:     count = {}
      max_count = 0
      mode = values[0]
  
      for value in values:
          if value in count:
              count[value] += 1
          else:
              count[value] = 1
  
          if count[value] > max_count:
              max_count = count[value]
              mode = value
  
      return mode