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