let' move the code for firing bullet to separate function so we can use single line of code to fire bullet and keep the elif block in check_keydown_events(simplegame_ functions py def check_keydown_events(eventai_settingsscreenshipbullets)"""respond to keypresses ""--snip-elif event key =pygame k_spacefire_bullet(ai_settingsscreenshipbulletsdef fire_bullet(ai_settingsscreenshipbullets)"""fire bullet if limit not reached yet ""create new bullet and add it to the bullets group if len(bulletsai_settings bullets_allowednew_bullet bullet(ai_settingsscreenshipbullets add(new_bulletthe function fire_bullet(simply contains the code that was used to fire bullet when the spacebar is pressedand we add call to fire_bullet(in check_keydown_events(when the spacebar is pressed run alien_invasion py one more timeand make sure you can still fire bullets without errors try it yourse lf - sideways shooterwrite game that places ship on the left side of the screen and allows the player to move the ship up and down make the ship fire bullet that travels right across the screen when the player presses the spacebar make sure bullets are deleted once they disappear off the screen summary in this you learned to make plan for game you learned the basic structure of game written in pygame you learned to set background color and store settings in separate class where they can be made available to all parts of the game you saw how to draw an image to the screen and give the player control over the movement of game elements you learned to create elements that move on their ownlike bullets flying up screenand how to delete objects that are no longer needed you learned to refactor code in project on regular basis to facilitate ongoing development in we'll add aliens to alien invasion by the end of you'll be able to shoot down alienshopefully before they reach your ship