If you are always going to spawn a perfect square just pass the function the square side (like 3 for 9 sprite spawn then walk the location around in a double for loop from 1 to 3 in both x and y spawning once for each x,y location pair.
you may also want to pass the lower_x and lower_y as the cornter of the spawn area and then add that to each x,y pair as the offset_