input: Write a function to play a rock-paper-scissors game between two players. The function should take two inputs, each representing a player's choice ('rock', 'paper', or 'scissors'). It should return a string indicating whether Player 1 wins, Player 2 wins, or if it is a draw. If any invalid choice is provided, the function should return an error message.
  
  def play_game(player1, player2):
      if player1 not in ['rock', 'paper', 'scissors'] or player2 not in ['rock', 'paper', 'scissors']:
          return 'Invalid choice. Both players must choose from rock, paper, or scissors.'
      rules = {'rock': 'scissors', 'scissors': 'paper', 'paper': 'rock'}
      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('rock', 'rock')=='It is a draw!'
  assert play_game('scissors', 'rock')=='Player 2 wins!'
  assert play_game('paper', 'scissors')=='Player 2 wins!'
  assert play_game('rock', 'paper')=='Player 2 wins!'
  assert play_game('rock', 'invalid')=='Invalid choice. Both players must choose from rock, paper, or scissors.'
  assert play_game('invalid', 'rock')=='Invalid choice. Both players must choose from rock, paper, or scissors.'
  assert play_game('invalid', 'invalid')=='Invalid choice. Both players must choose from rock, paper, or scissors.'
output: def play_game(player1, player2):
      if player1 not in ['rock', 'paper', 'scissors'] or player2 not in ['rock', 'paper', 'scissors']:
          return 'Invalid choice. Both players must choose from rock, paper, or scissors.'
      rules = {'rock': 'scissors', 'scissors': 'paper', 'paper': 'rock'}
      if player1 == player2:
          return 'It is a draw!'
      elif rules[player1] == player2:
          return 'Player 1 wins!'
      elif rules[player2] == player1:
          return 'Player 2 wins!'