factory pattern shape_game py import pygame class shape(object)def __init__(selfxy)self self def draw(self)raise notimplementederror(def move(selfdirection)if direction ='up'self - elif direction ='down'self + elif direction ='left'self - elif direction ='right'self + class square(shape)def draw(self)pygame draw rectscreen( )pygame rect(self xself class circle(shape)def draw(self)pygame draw circlescreen( )(selfxself )