input: Write a function to create a TicTacToe game in Python. The function should return an instance of the TicTacToe class that has methods to initialize the game board, display the board, and check if a player has won.
  
  def create_tic_tac_toe():
      class TicTacToe:
          def __init__(self):
              self.board = [['_' for _ in range(3)] for _ in range(3)]
              self.turn = 'x'
  
          def display(self):
              for row in self.board:
                  print(' '.join(row))
  
          def check_win(self):
              board = self.board
              for row in self.board:
                  if row.count(self.turn) == 3:
                      return True
              for col in range(3):
                  if board[0][col] == board[1][col] and board[1][col] == board[2][col] and board[2][col] == self.turn:
                      return True
              if board[0][0] == board[1][1] and board[1][1] == board[2][2] and board[2][2] == self.turn:
                  return True
              if board[0][2] == board[1][1] and board[1][1] == board[2][0] and board[2][0] == self.turn:
                  return True
              return False
      return TicTacToe()
  
  assert isinstance(create_tic_tac_toe(), TicTacToe) == True
  assert create_tic_tac_toe().check_win() == False
  assert create_tic_tac_toe().turn == 'x'
output: def create_tic_tac_toe():
      class TicTacToe:
          def __init__(self):
              self.board = [['_' for _ in range(3)] for _ in range(3)]
              self.turn = 'x'
  
          def display(self):
              for row in self.board:
                  print(' '.join(row))
  
          def check_win(self):
              board = self.board
              for row in self.board:
                  if row.count(self.turn) == 3:
                      return True
              for col in range(3):
                  if board[0][col] == board[1][col] and board[1][col] == board[2][col] and board[2][col] == self.turn:
                      return True
              if board[0][0] == board[1][1] and board[1][1] == board[2][2] and board[2][2] == self.turn:
                  return True
              if board[0][2] == board[1][1] and board[1][1] == board[2][0] and board[2][0] == self.turn:
                  return True
              return False
      return TicTacToe()