input: Write a Python function called `square_index` that takes a list of integers called `nums` as input and returns a list of tuples. Each tuple should contain the index of the element in the original list and the square of that element. If the input list is empty, the function should return an empty list.
  
  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])==[(0, 0), (1, 1), (2, 4), (3, 9)]
  assert square_index([])==[]
output: def square_index(nums):
      return [(i, num**2) for i, num in enumerate(nums)]