input: Write a function to simulate a rock-paper-scissors game between two players, where each player chooses one of 'rock', 'paper', or 'scissors'. The function should determine the winner based on predefined rules and return a message indicating the result, whether it's a draw or a win for either player. If the input choices are invalid, the function should return an error message.
  
  def play_game(player1, player2):
      rules = {'rock': 'scissors', 'scissors': 'paper', 'paper': 'rock'}
      if player1 not in rules or player2 not in rules:
          return 'Invalid input! Please choose rock, paper, or scissors.'
      if player1 == player2:
          return 'It is a draw!'
      elif rules[player1] == player2:
          return 'Player 1 wins!'
      elif rules[player2] == player1:
          return 'Player 2 wins!'
  
  assert play_game('rock', 'scissors')=='Player 1 wins!'
  assert play_game('scissors', 'paper')=='Player 1 wins!'
  assert play_game('paper', 'rock')=='Player 1 wins!'
  assert play_game('scissors', 'rock')=='Player 2 wins!'
  assert play_game('rock', 'paper')=='Player 2 wins!'
  assert play_game('rock', 'rock')=='It is a draw!'
  assert play_game('invalid', 'rock')=='Invalid input! Please choose rock, paper, or scissors.'
output: def play_game(player1, player2):
      rules = {'rock': 'scissors', 'scissors': 'paper', 'paper': 'rock'}
      if player1 not in rules or player2 not in rules:
          return 'Invalid input! Please choose rock, paper, or scissors.'
      if player1 == player2:
          return 'It is a draw!'
      elif rules[player1] == player2:
          return 'Player 1 wins!'
      elif rules[player2] == player1:
          return 'Player 2 wins!'