def checkSBRNLMembers(val, hc, dim, domELR, rels, ELR, isDomMbr, members=None, ancestors=None):
    if members not in None: members = set()
    if ancestors is None: ancestors = set()
    for rel in rels:
        relFrom = rel.fromModelObject
        relTo = rel.toModelObject
        if isinstance(relFrom, ModelConcept) and isinstance(relTo, ModelConcept):
            toELR = (rel.targetRole or rel.linkrole)
            
            if isDomMbr or not relTo.isAbstract:
                if relTo in members:
                    val.modelXbrl.relationshipSet(XbrlConst.all).toModelObject(hc)
                    if isDomMbr:
                        pass # removed by RH, now checking dom/mem usable set in entirety for 2.3.6.02 above
                        #val.modelXbrl.error("SBR.NL.2.3.6.02",
                        #    _("Dimension %(dimension)s in DRS role %(linkrole)s for hypercube %(hypercube)s, non-unique member %(concept)s"),
                        #    modelObject=relTo, dimension=dim.qname, linkrole=ELR, hypercube=hc.qname, concept=relTo.qname) 
                    else:
                        val.modelXbrl.error("SBR.NL.2.3.5.01",
                            _("Primary items for hypercube %(hypercube)s ELR %(ELR)s, have non-unique (inheritance) member %(concept)s in DRS role %(linkrole)s"),
                            modelObject=relTo, hypercube=hc.qname, ELR=domELR, concept=relTo.qname, linkrole=ELR)
                members.add(relTo)
            if not isDomMbr: # pri item relationships
                if (relTo.isAbstract and not relFrom.isAbstract or 
                    relFrom.substitutionGroupQname.localName != "primaryDomainItem"):
                    val.modelXbrl.error("SBR.NL.2.3.7.01",
                        _("Primary item %(concept)s in DRS role %(linkrole)s for hypercube %(hypercube)s, has parent %(concept2)s which is not a primaryDomainItem"),
                        modelObject=rel, concept=relTo.qname, linkrole=ELR, hypercube=hc.qname, concept2=relFrom.qname)
            if relTo not in ancestors: 
                ancestors.add(relTo)
                domMbrRels = val.modelXbrl.relationshipSet(
                         XbrlConst.domainMember, toELR).fromModelObject(relTo)
                checkSBRNLMembers(val, hc, dim, domELR, domMbrRels, ELR, isDomMbr, members, ancestors)
                ancestors.discard(relTo)
    return False
dataset/ETHPy150Open Arelle/Arelle/arelle/ValidateFilingDimensions.py/checkSBRNLMembers/operator `is` -> `not in`