input: Write a function to determine the next move in a Tic-Tac-Toe game using the minimax algorithm.
  assert get_next_move([[' ', ' ', ' '], [' ', ' ', ' '], [' ', ' ', ' ']], 'X', 5) is not None
  assert get_next_move([['X', 'O', 'X'], ['O', 'X', ' '], [' ', 'O', ' ']], 'X', 2) in [(1, 2), (2, 2)]
  assert get_next_move([['X', 'X', 'O'], ['O', 'O', 'X'], ['X', 'O', ' ']], 'X', 1) == (2, 2)
output: def get_next_move(board, player, depth):
      def minimax(board, depth, is_maximizing):
          winner = check_winner(board)
          if winner:
              return scores[winner]
          if is_board_full(board):
              return 0
          if depth == 0:
              return 0
          
          if is_maximizing:
              best_score = float('-inf')
              for i in range(3):
                  for j in range(3):
                      if board[i][j] == ' ':
                          board[i][j] = player
                          score = minimax(board, depth - 1, False)
                          board[i][j] = ' '
                          best_score = max(score, best_score)
              return best_score
          else:
              best_score = float('inf')
              for i in range(3):
                  for j in range(3):
                      if board[i][j] == ' ':
                          board[i][j] = opponent
                          score = minimax(board, depth - 1, True)
                          board[i][j] = ' '
                          best_score = min(score, best_score)
              return best_score
      
      def check_winner(board):
          lines = [
              [board[0][0], board[0][1], board[0][2]],
              [board[1][0], board[1][1], board[1][2]],
              [board[2][0], board[2][1], board[2][2]],
              [board[0][0], board[1][0], board[2][0]],
              [board[0][1], board[1][1], board[2][1]],
              [board[0][2], board[1][2], board[2][2]],
              [board[0][0], board[1][1], board[2][2]],
              [board[2][0], board[1][1], board[0][2]]
          ]
          for line in lines:
              if line[0] == line[1] == line[2] and line[0] != ' ':
                  return line[0]
          return None
      
      def is_board_full(board):
          for row in board:
              if ' ' in row:
                  return False
          return True
      
      if player == 'X':
          opponent = 'O'
      else:
          opponent = 'X'
      
      scores = {player: 10, opponent: -10}
      
      best_move = None
      best_score = float('-inf')
      
      for i in range(3):
          for j in range(3):
              if board[i][j] == ' ':
                  board[i][j] = player
                  move_score = minimax(board, depth - 1, False)
                  board[i][j] = ' '
                  if move_score > best_score:
                      best_score = move_score
                      best_move = (i, j)
      
      return best_move