input: Write a function to determine the winner of a rock-paper-scissors game between two players. The function should return 'It is a draw!' if both players make the same choice, 'Player 1 wins!' if Player 1's choice beats Player 2's choice, and 'Player 2 wins!' if Player 2's choice beats Player 1's choice. If the inputs are not valid choices (rock, paper, or scissors), return 'Invalid input!'.
  
  
  def play_game(player1, player2):
      valid_choices = {'rock', 'paper', 'scissors'}
      if player1 not in valid_choices or player2 not in valid_choices:
          return 'Invalid input!'
      if player1 == player2:
          return 'It is a draw!'
      rules = {'rock': 'scissors', 'scissors': 'paper', 'paper': 'rock'}
      if rules[player1] == player2:
          return 'Player 1 wins!'
      return 'Player 2 wins!'
  
  assert play_game('rock', 'scissors') == 'Player 1 wins!'
  assert play_game('scissors', 'rock') == 'Player 2 wins!'
  assert play_game('paper', 'rock') == 'Player 1 wins!'
  assert play_game('rock', 'rock') == 'It is a draw!'
  assert play_game('scissors', 'scissors') == 'It is a draw!'
  assert play_game('rock', 'banana') == 'Invalid input!'
  assert play_game('banana', 'rock') == 'Invalid input!'
  
output: def play_game(player1, player2):
      valid_choices = {'rock', 'paper', 'scissors'}
      if player1 not in valid_choices or player2 not in valid_choices:
          return 'Invalid input!'
      if player1 == player2:
          return 'It is a draw!'
      rules = {'rock': 'scissors', 'scissors': 'paper', 'paper': 'rock'}
      if rules[player1] == player2:
          return 'Player 1 wins!'
      return 'Player 2 wins!'