input: 
  from typing import List
  
  def find_mode(nums: List[int]) -> int:
      """ Finds the mode of a given list of integers.
      The mode is the number that appears most frequently in the list.
      If there are multiple numbers with the same highest frequency, it returns 
      the first one that appears in the list.
      >>> find_mode([1, 2, 3, 2, 4, 2])
      2
      >>> find_mode([1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4])
      4
      """
      max_count = 0
      mode = nums[0]
      count = {}
      for item in nums:
          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 = nums[0]
      count = {}
      for item in nums:
          if (item in count):
              count[item] += 1
          else:
              count[item] = 1
          if (count[item] > max_count):
              max_count = count[item]
              mode = item
      return mode