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
498042
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 []
144390
def ancestry(self):
        
        if not self.inherits():
            return []

        schema = orb.system.schema(self.inherits())
        if not schema:
            return []

        return schema.ancestry() + [schema]
731934
function (node, pred) {
            var ancestors = listAncestor(node);
            return list.last(ancestors.filter(pred));
        }
614781
def get_ancestors(self):
        
        if self.is_root():
            return get_result_class(self.__class__).objects.none()
        return get_result_class(self.__class__).objects.filter(
            tree_id=self.tree_id,
            lft__lt=self.lft,
            rgt__gt=self.rgt)
699585
def ancestors(self):
        
        ancestors = []
        p = self.parent
        while p is not None:
            ancestors.append(p)
            p = p.parent
        return ancestors
1038805
def list_hierarchy(class_name, bases):
    

    class_list = [Uri(class_name)]
    for base in bases:
        if base.__name__ not in IGNORE_CLASSES:
            class_list.append(Uri(base.__name__))
    return list([i for i in set(class_list)])
581716
def visible_ancestors
      return [] unless parent
      if new_record?
        parent.visible_ancestors.tap do |base|
          base.push(parent) if parent.visible?
        end
      else
        ancestors.visible.contentpages.where(language_root: nil).to_a
      end
    end
956551
public List<OrderingType<WebFragmentDescriptor>> getAllOrdering()
   {
      List<OrderingType<WebFragmentDescriptor>> list = new ArrayList<OrderingType<WebFragmentDescriptor>>();
      List<Node> nodeList = model.get("ordering");
      for(Node node: nodeList)
      {
         OrderingType<WebFragmentDescriptor>  type = new OrderingTypeImpl<WebFragmentDescriptor>(this, "ordering", model, node);
         list.add(type);
      }
      return list;
   }
723906
def _ancestors_or_self(
            self, qname: Union[QualName, bool] = None) -> List[InstanceNode]:
        """"""
        res = [] if qname and self.qual_name != qname else [self]
        return res + self.up()._ancestors(qname)
631278
def _ancestors(collection):
    """"""
    for index, c in enumerate(collection.path_to_root()):
        if index > 0 and c.dbquery is not None:
            raise StopIteration
        yield c.name
    raise StopIteration
1227437
function getAncestors(node) {
    const ancestorsStartingAtParent = [];

    for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) {
        ancestorsStartingAtParent.push(ancestor);
    }

    return ancestorsStartingAtParent.reverse();
}
908940
def order(self):
        
        return [x.val for theclass in self.classes for x in theclass.items]
1250599
def genealogic_ids(self):
        

        ids = []
        parent = self

        while parent:
            ids.append(parent.id)
            parent = parent.parent_object

        return ids
1151826
def ancestor(qobject, classType):
    
    parent = qobject
    is_class = True
    while parent:
        if type(parent).__name__ == classType:
            return parent
        
        if is_class:
            try:
                if isinstance(parent, classType):
                    return parent
            except TypeError:
                is_class = False
        
        parent = parent.parent()
    
    return None
928895
def _preceding_siblings(
            self, qname: Union[QualName, bool] = None) -> List[InstanceNode]:
        """"""
        if qname and self.qual_name != qname:
            return []
        res = []
        en = self
        for _ in self.before:
            en = en.previous()
            res.append(en)
        return res
90457
def _get_ancestors(self, current=None):
        
        if not current:
            current = []
        current.insert(0, self)
        if self.is_root:
            if current:
                return current
        else:
            return self.parent._get_ancestors(current)
672994
def get_parent_family_nodes(self):
        
        parent_family_nodes = []
        for node in self._my_map['parentNodes']:
            parent_family_nodes.append(FamilyNode(
                node._my_map,
                runtime=self._runtime,
                proxy=self._proxy,
                lookup_session=self._lookup_session))
        return FamilyNodeList(parent_family_nodes)