input: Write a Python function to determine if there is a winner in a Tic-Tac-Toe game.
  assert check_winner(np.array([[1, 1, 1], [0, 2, 0], [2, 0, 2]])) == 1
  assert check_winner(np.array([[2, 1, 1], [0, 2, 0], [2, 0, 2]])) == 2
  assert check_winner(np.array([[0, 1, 1], [0, 2, 0], [2, 0, 2]])) == 0
output: import numpy as np
  
  def check_winner(board):
      # Check rows and columns
      for i in range(3):
          if board[i, 0] == board[i, 1] == board[i, 2] != 0:
              return board[i, 0]
          if board[0, i] == board[1, i] == board[2, i] != 0:
              return board[0, i]
      
      # Check diagonals
      if board[0, 0] == board[1, 1] == board[2, 2] != 0:
          return board[0, 0]
      if board[0, 2] == board[1, 1] == board[2, 0] != 0:
          return board[0, 2]
      
      # No winner
      return 0