input: Write a function to find the index of the largest number in a given list of integers. If the list is empty, return `None`. The function should return the index of the largest number.
  
  def find_max_index(nums):
      if not nums:
          return None
      max_num = max(nums)
      return nums.index(max_num)
  
  assert find_max_index([5, 10, 20, 6, 8])==2
  assert find_max_index([3, 5, 10, 1, 2])==2
  assert find_max_index([4, 3, 1, 2])==0
  assert find_max_index([])==None
  assert find_max_index([1])==0
output: def find_max_index(nums):
      if not nums:
          return None
      max_num = max(nums)
      return nums.index(max_num)