<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gen_postinits(self, cls: ClassDefinition) -> str: """ Generate all the typing and existence checks post initialize """

        post_inits = []
        if not cls.abstract:
            pkeys = self.primary_keys_for(cls)
            for pkey in pkeys:
                post_inits.append(self.gen_postinit(cls, pkey))
        for slotname in cls.slots:
            slot = self.schema.slots[slotname]
            if not (slot.primary_key or slot.identifier):
                post_inits.append(self.gen_postinit(cls, slotname))
        post_inits_line = '\n\t\t'.join([p for p in post_inits if p])
        return (f'''
    def _fix_elements(self):
        super()._fix_elements()
        {post_inits_line}''' + '\n') if post_inits_line else ''