Implement a verifier for a popular puzzle game like a Minesweeper board or Sudoku grid.
For this implementation, verify a partially completed Sudoku board. The board is valid when every nonzero value appears at most once in its row, column, and square subgrid.
Implement verify_sudoku(board), where board is a square list of lists containing integers from 0 through n. Return True for a valid board and False otherwise. 0 represents an empty cell. The board dimension is a perfect square.
def verify_sudoku(board):