For a ValueMomentum coding assessment simulator, process a sequence of Rock Paper Scissors rounds between two players. For each round, determine whether Player 1 wins, Player 2 wins, or the round is a draw, then return the complete result sequence and cumulative scores.
Implement rock_paper_scissors(player1, player2), where player1 and player2 are arrays of equal length containing only the strings "rock", "paper", or "scissors". Return a dictionary with these keys:
results: an array containing "P1", "P2", or "Draw" for each roundplayer1_wins: the number of rounds won by Player 1player2_wins: the number of rounds won by Player 2draws: the number of drawn roundswinner: "Player 1", "Player 2", or "Draw" based on cumulative scoresUse the standard rules: rock beats scissors, scissors beats paper, and paper beats rock. The winner is determined by a single pass through the rounds.
def rock_paper_scissors(player1, player2):