

def commonAncestor(domainMemberRelationshipSet, negSourceConcept, posSourceConcepts):
    negAncestors = ancestorOrSelf(domainMemberRelationshipSet, negSourceConcept)
    for posSourceConcept in posSourceConcepts:
        if len((negAncestors & ancestorOrSelf(domainMemberRelationshipSet, posSourceConcept))):
            return True
    return False

dataset/ETHPy150Open Arelle/Arelle/arelle/ValidateFilingDimensions.py commonAncestor/original