def filter_redundant(self, ids):
        """
        Return all non-redundant ids from a list
        """
        sids = set(ids)
        for id in ids:
            sids = sids.difference(self.ancestors(id, reflexive=False))
        return sids
def filter_redundant ( self , ids ) : sids = set ( ids ) for id in ids : sids = sids . difference ( self . ancestors ( id , reflexive = False ) ) return sids
Return all non-redundant ids from a list