

def ancestorOrSelf(domainMemberRelationshipSet, sourceConcept, result=None):
    if (not result):
        result = set()
    if (not (sourceConcept in result)):
        result.add(sourceConcept)
        for rels in result.toModelObject(sourceConcept):
            ancestorOrSelf(domainMemberRelationshipSet, rels.fromModelObject, result)
    return result

dataset/ETHPy150Open Arelle/Arelle/arelle/ValidateFilingDimensions.py ancestorOrSelf/VarMisuse@53/71 `domainMemberRelationshipSet`->`result`