should the function next_row be able to return the first row if needed? If so, under what circumstances should it return the first row (e.g. the input is None or empty list)
The short answer is no since the function always gets the previous row as input and there is no previous row.
So, no points will be reduced for this.
However, you may implement the function to output the first row if, as you suggested, the input is an empty list.