Returns the UIDs of all the ancestors (Analysis Requests) this analysis
    comes from
335015
def getAncestorsUIDs(instance):
    
    request = instance.getRequest()
    parents = map(lambda ar: api.get_uid(ar), request.getAncestors())
    return [api.get_uid(request)] + parents
144270
def ancestors_objects(self):
        """"""
        ancestors_objects = []
        for ancestor in self.ancestors:
            try:
                ancestor_object = GeoZone.objects.get(id=ancestor)
            except GeoZone.DoesNotExist:
                continue
            ancestors_objects.append(ancestor_object)
        ancestors_objects.sort(key=lambda a: a.name)
        return ancestors_objects
219493
def ancestors(self, full_table_name):
        
        nodes = self.subgraph(
            nx.algorithms.dag.ancestors(self, full_table_name))
        return [full_table_name] + list(reversed(list(
            nx.algorithms.dag.topological_sort(nodes))))
401958
def _ancestors(self):
        
        # return list of ancestor nodes starting with self.parent and ending with root
        _ancestors=[]
        _n = self
        while _n.parent:
            _n = _n.parent
            _ancestors.append(_n)
        return _ancestors
182031
def get_uids_from_request(self):
        
        uids = self.request.get("uids", "")
        if isinstance(uids, basestring):
            uids = uids.split(",")
        unique_uids = collections.OrderedDict().fromkeys(uids).keys()
        return filter(api.is_uid, unique_uids)
345686
public function getOldAncestors()
    {
        // No need to access DB to get ancestors as they are given by the materialized path.
        $parts = preg_split('/-(\d+)'.ResourceNode::PATH_OLDSEPARATOR.'/', $this->path, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
        $ancestors = [];
        $countAncestors = count($parts);
        for ($i = 0; $i < $countAncestors; $i += 2) {
            if (array_key_exists($i + 1, $parts)) {
                $ancestors[] = [
                    'id' => (int) $parts[$i + 1],
                    'name' => $parts[$i],
                ];
            }
        }

        return $ancestors;
    }
1116239
def get_ancestors(self, limit: int, header: BlockHeader) -> Tuple[BaseBlock, ...]:
        
        ancestor_count = min(header.block_number, limit)

        # We construct a temporary block object
        vm_class = self.get_vm_class_for_block_number(header.block_number)
        block_class = vm_class.get_block_class()
        block = block_class(header=header, uncles=[])

        ancestor_generator = iterate(compose(
            self.get_block_by_hash,
            operator.attrgetter('parent_hash'),
            operator.attrgetter('header'),
        ), block)
        # we peel off the first element from the iterator which will be the
        # temporary block object we constructed.
        next(ancestor_generator)

        return tuple(take(ancestor_count, ancestor_generator))
295009
def getServiceDependenciesUIDs(self):
        
        deps = self.getServiceDependencies()
        deps_uids = [service.UID() for service in deps]
        return deps_uids
1166114
def getDescendantsUIDs(self, all_descendants=False):
        
        descendants = self.getDescendants(all_descendants=all_descendants)
        return map(api.get_uid, descendants)
858127
def parents(self):
        
        return [self.repository.get_changeset(parent.rev())
                for parent in self._ctx.parents() if parent.rev() >= 0]
53937
def get_hierarchies_by_ids(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_by_ids
        catalogs = self._get_provider_session('hierarchy_lookup_session').get_hierarchies_by_ids(*args, **kwargs)
        cat_list = []
        for cat in catalogs:
            cat_list.append(Hierarchy(self._provider_manager, cat, self._runtime, self._proxy))
        return HierarchyList(cat_list)
144390
def ancestry(self):
        
        if not self.inherits():
            return []

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

        return schema.ancestry() + [schema]
532946
def childIds(self):
        
        if self.depth >= len(self.citation.root):
            return []
        elif self._children is not None:
            return self._children
        else:
            self._children = self.getReffs()
            return self._children
216712
def get_ancestors(self, include_self=False, depth=None):
        """"""
        if self.is_root_node():
            if not include_self:
                return self._toplevel().objects.none()
            else:
                # Filter on pk for efficiency.
                return self._toplevel().objects.filter(pk=self.pk)

        params = {"%s__child" % self._closure_parentref():self.pk}
        if depth is not None:
            params["%s__depth__lte" % self._closure_parentref()] = depth
        ancestors = self._toplevel().objects.filter(**params)
        if not include_self:
            ancestors = ancestors.exclude(pk=self.pk)
        return ancestors.order_by("%s__depth" % self._closure_parentref())
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
940039
def ancestors
      node  = self
      nodes = []
      nodes << node = node.parent while node.parent
      nodes
    end
120791
def iter_ancestors(self):
        
        node = self
        while node.up is not None:
            yield node.up
            node = node.up