factory pattern assert "bad shape requestedtype class square(shape)def draw(self)pygame draw rectscreen( )pygame rect(self xself class circle(shape)def draw(self)pygame draw circlescreen( )(selfxself ) if __name__ ='__main__'window_dimensions screen pygame display set_mode(window_dimensionsobj shape factory("square"player_quits false while not player_quitsfor event in pygame event get()if event type =pygame quitplayer_quits true pressed pygame key get_pressed(if pressed[pygame k_up]obj move('up'if pressed[pygame k_down]obj move('down'if pressed[pygame k_left]obj move('left'if pressed[pygame k_right]obj move('right'