the prototype pattern if level = self life self speed self attack_power self attack_range self weapon "short bowelif level = self life self speed self attack_power self attack_range self weapon "long bowdef __str__(self)return "type{ }\ "life{ }\ "speed{ }\ "attack power{ }\ "attack range{ }\ "weapon{ }formatself unit_typeself lifeself speedself attack_powerself attack_rangeself weapon class barracks(object)def build_unit(selfunit_typelevel)if unit_type ="knight"return knight(levelelif unit_type ="archer"return archer(levelif __name__ ="__main__"barracks barracks(