input: def play_TicTacToe_game():
      """Develop an AI Tic-Tac-Toe game using Python. The game allows a human player to 
      play against an AI that randomly chooses spots if it cannot win or block a win. 
      The game ends when either the human player wins, the AI wins, or the board is full,
      resulting in a draw.
      >>> play_TicTacToe_game()
      The game is drawn!
      """
output:     import random
  
      def print_board(board):
          for row in board:
              print(" | ".join(row))
              print("-" * 5)
  
      def check_winner(board, player):
          for row in board:
              if all([cell == player for cell in row]):
                  return True
          for col in range(3):
              if all([board[row][col] == player for row in range(3)]):
                  return True
          if all([board[i][i] == player for i in range(3)]) or all([board[i][2 - i] == player for i in range(3)]):
              return True
          return False
  
      def is_board_full(board):
          return all([cell != " " for row in board for cell in row])
  
      def get_player_move(board):
          while True:
              try:
                  move = int(input("Enter your move (1-9): ")) - 1
                  if move < 0 or move >= 9 or board[move // 3][move % 3] != " ":
                      print("Invalid move. Try again.")
                  else:
                      return move
              except ValueError:
                  print("Invalid input. Enter a number between 1 and 9.")
  
      def get_ai_move(board):
          for player in ["O", "X"]:
              for i in range(9):
                  if board[i // 3][i % 3] == " ":
                      board[i // 3][i % 3] = player
                      if check_winner(board, player):
                          board[i // 3][i % 3] = " "
                          return i
                      board[i // 3][i % 3] = " "
          available_moves = [i for i in range(9) if board[i // 3][i % 3] == " "]
          return random.choice(available_moves)
  
      board = [[" " for _ in range(3)] for _ in range(3)]
      current_player = "X"
  
      while True:
          print_board(board)
          if current_player == "X":
              move = get_player_move(board)
          else:
              move = get_ai_move(board)
          board[move // 3][move % 3] = current_player
          if check_winner(board, current_player):
              print_board(board)
              print(f"Player {current_player} wins!")
              break
          if is_board_full(board):
              print_board(board)
              print("The game is drawn!")
              break
          current_player = "O" if current_player == "X" else "X"