input: Write a function to check if the given board has a winner in a Noughts and Crosses game.
  assert check_winner([
      ["X", "X", "X"],
      [None, "O", "O"],
      [None, None, None]
  ]) == True
  assert check_winner([
      ["O", "X", "X"],
      ["X", "O", "X"],
      [None, "O", "O"]
  ]) == True
  assert check_winner([
      ["O", "X", "X"],
      ["X", "O", "X"],
      ["O", "X", "O"]
  ]) == True
  assert check_winner([
      ["O", "X", None],
      ["X", "O", "X"],
      ["O", "X", "O"]
  ]) == False
output: def check_winner(board):
      # Check rows for a winner
      for row in board:
          if row[0] == row[1] == row[2] and row[0] is not None:
              return True
      
      # Check columns for a winner
      for col in range(3):
          if board[0][col] == board[1][col] == board[2][col] and board[0][col] is not None:
              return True
      
      # Check diagonals for a winner
      if board[0][0] == board[1][1] == board[2][2] and board[0][0] is not None:
          return True
      if board[0][2] == board[1][1] == board[2][0] and board[0][2] is not None:
          return True
      
      return False