input: Write a function to implement a decision-making algorithm for a rock-paper-scissors game using Python. The function should take two inputs, player1 and player2, which represent the choices of the two players. The function should determine and return the result of the game based on the predefined winning rules. If the choices are the same, it should return 'It is a draw!'. If player1 wins, it should return 'Player 1 wins!'. If player2 wins, it should return 'Player 2 wins!'.
  
  def play_game(player1, player2):
      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('paper', 'rock') == 'Player 1 wins!'
  assert play_game('scissors', 'rock') == 'Player 2 wins!'
  assert play_game('scissors', 'scissors') == 'It is a draw!'
  assert play_game('paper', 'paper') == 'It is a draw!'
output: def play_game(player1, player2):
      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!'