def gen_postinits(self, cls: ClassDefinition) -> str:
post_inits = []<EOL>if not cls.abstract:<EOL><INDENT>pkeys = self.primary_keys_for(cls)<EOL>for pkey in pkeys:<EOL><INDENT>post_inits.append(self.gen_postinit(cls, pkey))<EOL><DEDENT><DEDENT>for slotname in cls.slots:<EOL><INDENT>slot = self.schema.slots[slotname]<EOL>if not (slot.primary_key or slot.identifier):<EOL><INDENT>post_inits.append(self.gen_postinit(cls, slotname))<EOL><DEDENT><DEDENT>post_inits_line = '<STR_LIT>'.join([p for p in post_inits if p])<EOL>return (f'''<STR_LIT>''' + '<STR_LIT:\n>') if post_inits_line else '<STR_LIT>'<EOL>
Generate all the typing and existence checks post initialize