def ancestors(self, definition: Union[SLOT_OR_SLOTNAME,
                                          CLASS_OR_CLASSNAME]) \
            -> List[Union[SlotDefinitionName, ClassDefinitionName]]:
        """ Return an ordered list of ancestor names for the supplied slot or class

        @param definition: Slot or class name or definition
        @return: List of ancestor names
        """
        definition = self.obj_for(definition)
        if definition is not None:
            return [definition.name] + self.ancestors(definition.is_a)
        else:
            return []
def ancestors ( self , definition : Union [ SLOT_OR_SLOTNAME , CLASS_OR_CLASSNAME ] ) -> List [ Union [ SlotDefinitionName , ClassDefinitionName ] ] : definition = self . obj_for ( definition ) if definition is not None : return [ definition . name ] + self . ancestors ( definition . is_a ) else : return [ ]
Return an ordered list of ancestor names for the supplied slot or class

        @param definition: Slot or class name or definition
        @return: List of ancestor names