get siblings of ancestors (i.e. aunts and uncles) of given el
542272
function getSiblingsOfAncestors(el) {
    return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);
}
596783
def _get_ancestors_of(self, obs_nodes_list):
        
        if not obs_nodes_list:
            return set()
        return set(obs_nodes_list) | set(self.parent_node)
1363518
def prev_sibling(self):
        
        if self.parent is None:
            return None

        # Can't use index(); we need to test by identity
        for i, child in enumerate(self.parent.children):
            if child is self:
                if i == 0:
                    return None
                return self.parent.children[i-1]
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)
463674
def _get(cls, resource_id, parent_id, grandparent_id):
        """""""
        client = cls._get_client()
        endpoint = cls._endpoint.format(resource_id=resource_id or "",
                                        parent_id=parent_id or "",
                                        grandparent_id=grandparent_id or "")
        raw_data = client.get_resource(endpoint)
        raw_data["parentResourceID"] = parent_id
        raw_data["grandParentResourceID"] = grandparent_id
        return cls.from_raw_data(raw_data)
27902
def get_inheritors(cls):
    """"""
    subclasses = set()
    work = [cls]
    while work:
        parent = work.pop()
        for child in parent.__subclasses__():
            if child not in subclasses:
                subclasses.add(child)
                work.append(child)
    return subclasses
606861
def map
      RelativeSet.new(@hash.keys.inject({}) do |hash, key|
        hash[yield(key)] = true
        hash
      end)
    end
1073714
def ancestors(self):
        '''
        
        '''
        ancestors = []
        parent = self.parent
        while parent:
            ancestors.append(parent)
            parent = parent.parent
        return ancestors
1100103
function sibling(node, selector, ancestry) {
            var parent = ancestry[0], listProp, keys, i, l, k, m;
            if (!parent) { return false; }
            keys = estraverse.VisitorKeys[parent.type];
            for (i = 0, l = keys.length; i < l; ++i) {
                listProp = parent[keys[i]];
                if (isArray(listProp)) {
                    for (k = 0, m = listProp.length; k < m; ++k) {
                        if (listProp[k] !== node && matches(listProp[k], selector, ancestry)) {
                            return true;
                        }
                    }
                }
            }
            return false;
        }
699585
def ancestors(self):
        
        ancestors = []
        p = self.parent
        while p is not None:
            ancestors.append(p)
            p = p.parent
        return ancestors
467851
function getPreviousSiblings(el, siblings = []) {
    const previousSibling = el.previousSibling;

    if (!previousSibling) {
        return siblings;
    }

    siblings.push(previousSibling);

    return getPreviousSiblings(previousSibling, siblings);
}
98395
def get_sisters(self):
        
        if self.up != None:
            return [ch for ch in self.up.children if ch != self]
        else:
            return []
610314
def _ancestors(
            self, qname: Union[QualName, bool] = None) -> List[InstanceNode]:
        """"""
        return self.up()._ancestors(qname)
1245199
def sibling(self, offs=1):
        '''
        
        '''
        indx = self.pindex + offs

        if indx < 0:
            return None

        if indx >= len(self.parent.kids):
            return None

        return self.parent.kids[indx]
834552
function(el, ancestorEl) {
    if (el && el.nodeType === 1 && el.ownerDocument && ancestorEl && (ancestorEl.nodeType === 1 && ancestorEl.ownerDocument && ancestorEl.ownerDocument === el.ownerDocument || ancestorEl.nodeType === 9 && !ancestorEl.ownerDocument && ancestorEl === el.ownerDocument)) {
      do {
        if (el === ancestorEl) {
          return true;
        }
        el = el.parentNode;
      } while (el);
    }
    return false;
  }
596075
def get_ancestors(self):
        ""

        if self._ancestors:
            return self._ancestors

        if not self.parent:
            return []

        obj = self.resource_map.get(self.parent.uid)

        while obj and obj.member_name:
            self._ancestors.append(obj)
            obj = obj.parent

        self._ancestors.reverse()
        return self._ancestors
128117
def ancestors(self, cl=None, noduplicates=True):
        
        if not cl:
            cl = self
        if cl.parents():
            bag = []
            for x in cl.parents():
                if x.uri != cl.uri:  # avoid circular relationships
                    bag += [x] + self.ancestors(x, noduplicates)
                else:
                    bag += [x]
            # finally:
            if noduplicates:
                return remove_duplicates(bag)
            else:
                return bag
        else:
            return []