def METHOD_NAME(self, cn: ClassDefinitionName) -> Optional[SlotDefinition]:
    sv = self.schemaview
    id_slot = sv.get_identifier_slot(cn)
    if id_slot:
        return id_slot
    else:
        for s in sv.class_induced_slots(cn):
            if s.key:
                return s
        return None