input: Write a function to generate a list of tuples where each tuple contains the index and the square of the corresponding number in the input list. The function should return the list of tuples.
  
  def square_index(nums):
      return [(index, num ** 2) for index, num in enumerate(nums)]
  
  assert square_index([1, 2, 3, 4, 5]) == [(0, 1), (1, 4), (2, 9), (3, 16), (4, 25)]
  assert square_index([0, -1, -2, 3, 4, 0]) == [(0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 0)]
  assert square_index([]) == []
  assert square_index([5]) == [(0, 25)]
  assert square_index([-3, -2, -1, 0, 1, 2, 3]) == [(0, 9), (1, 4), (2, 1), (3, 0), (4, 1), (5, 4), (6, 9)]
output: def square_index(nums):
      return [(index, num ** 2) for index, num in enumerate(nums)]