to check_play_button()game_ functions py def check_events(ai_settingsscreenstatsplay_buttonshipaliensbullets)"""respond to keypresses and mouse events ""for event in pygame event get()if event type =pygame quit--snip-elif event type =pygame mousebuttondownmouse_xmouse_y pygame mouse get_pos( check_play_button(ai_settingsscreenstatsplay_buttonshipaliensbulletsmouse_xmouse_ythe definition of check_events(needs the aliens parameterwhich it will pass to check_play_button(we then update the call to check_play_button(so it passes the appropriate arguments now update the call to check_events(in alien_invasion py so it passes the aliens argumentalien_ invasion py start the main loop for the game while truegf check_events(ai_settingsscreenstatsplay_buttonshipaliensbullets--snip-the game will now reset properly each time you click playallowing you to play it as many times as you wantdeactivating the play button one issue with our play button is that the button region on the screen will continue to respond to clicks even when the play button isn' visible click the play button area by accident once game has begun and the game will restartto fix thisset the game to start only when game_active is falsegame_ functions py def check_play_button(ai_settingsscreenstatsplay_buttonshipaliensbulletsmouse_xmouse_y)"""start new game when the player clicks play "" button_clicked play_button rect collidepoint(mouse_xmouse_yv if button_clicked and not stats game_activereset the game statistics --snip-the flag button_clicked stores true or false value uand the game will restart only if play is clicked and the game is not currently active to test this behaviorstart new game and repeatedly click where the play button should be if everything works as expectedclicking the play button area should have no effect on the gameplay scoring