def gen_references(self) -> str:
rval = []<EOL>for cls in self.schema.classes.values():<EOL><INDENT>pkeys = self.primary_keys_for(cls)<EOL>for pk in pkeys:<EOL><INDENT>pk_slot = self.schema.slots[pk]<EOL>classname = camelcase(cls.name) + camelcase(pk)<EOL>if cls.is_a and getattr(self.schema.classes[cls.is_a], pk, None):<EOL><INDENT>parent = self.range_type_name(pk_slot, cls.is_a)<EOL><DEDENT>else:<EOL><INDENT>parent = self.python_name_for(pk_slot.range)<EOL><DEDENT>rval.append(f'<STR_LIT>')<EOL><DEDENT><DEDENT>return '<STR_LIT>'.join(rval)<EOL>
Generate python type declarations for all identifiers (primary keys)