<s> '''<STR_LIT>''' <EOL> import re <EOL> from collections import defaultdict <EOL> from arelle import ( ModelDocument , ModelValue , <EOL> ModelRelationshipSet , XmlUtil , XbrlConst ) <EOL> from arelle . ModelDtsObject import ModelConcept <EOL> from arelle . PluginManager import pluginClassMethods <EOL> from arelle . UrlUtil import isHttpUrl <EOL> from . Dimensions import checkFilingDimensions <EOL> from . DTS import checkFilingDTS <EOL> def validateFiling ( val , modelXbrl ) : <EOL> linkroleDefinitionStatementSheet = re . compile ( r"<STR_LIT>" , <EOL> re . IGNORECASE ) <EOL> if not hasattr ( modelXbrl . modelDocument , "<STR_LIT>" ) : <EOL> return <EOL> val . _isStandardUri = { } <EOL> modelXbrl . modelManager . disclosureSystem . loadStandardTaxonomiesDict ( ) <EOL> val . typedDomainQnames = set ( ) <EOL> val . typedDomainElements = set ( ) <EOL> for modelConcept in modelXbrl . qnameConcepts . values ( ) : <EOL> if modelConcept . isTypedDimension : <EOL> typedDomainElement = modelConcept . typedDomainElement <EOL> if isinstance ( typedDomainElement , ModelConcept ) : <EOL> val . typedDomainQnames . add ( typedDomainElement . qname ) <EOL> val . typedDomainElements . add ( typedDomainElement ) <EOL> xbrlInstDoc = modelXbrl . modelDocument . xmlDocument . getroot ( ) <EOL> disclosureSystem = val . disclosureSystem <EOL> disclosureSystemVersion = disclosureSystem . version <EOL> modelXbrl . modelManager . showStatus ( _ ( "<STR_LIT>" ) . format ( disclosureSystem . name ) ) <EOL> val . modelXbrl . profileActivity ( ) <EOL> conceptsUsed = { } <EOL> labelsRelationshipSet = modelXbrl . relationshipSet ( XbrlConst . conceptLabel ) <EOL> genLabelsRelationshipSet = modelXbrl . relationshipSet ( XbrlConst . elementLabel ) <EOL> presentationRelationshipSet = modelXbrl . relationshipSet ( XbrlConst . parentChild ) <EOL> referencesRelationshipSetWithProhibits = modelXbrl . relationshipSet ( XbrlConst . conceptReference , includeProhibits = True ) <EOL> val . modelXbrl . profileActivity ( "<STR_LIT>" , minTimeToShow = <NUM_LIT:1.0> ) <EOL> val . validateLoggingSemantic = validateLoggingSemantic = ( <EOL> modelXbrl . isLoggingEffectiveFor ( level = "<STR_LIT>" ) or <EOL> modelXbrl . isLoggingEffectiveFor ( level = "<STR_LIT>" ) ) <EOL> val . fileNameBasePart = None <EOL> val . fileNameDate = None <EOL> val . entityRegistrantName = None <EOL> val . requiredContext = None <EOL> val . standardNamespaceConflicts = defaultdict ( set ) <EOL> val . exhibitType = None <EOL> if modelXbrl . modelDocument . type == ModelDocument . Type . SCHEMA : <EOL> if not any ( hrefElt . localName == "<STR_LIT>" and hrefElt . get ( "<STR_LIT>" ) == "<STR_LIT>" <EOL> for hrefElt , hrefDoc , hrefId in modelXbrl . modelDocument . hrefObjects ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> '<STR_LIT>' , modelObject = modelXbrl . modelDocument ) <EOL> for concept in modelXbrl . qnameConcepts . values ( ) : <EOL> conceptHasDefaultLangStandardLabel = False <EOL> for modelLabelRel in labelsRelationshipSet . fromModelObject ( concept ) : <EOL> modelLabel = modelLabelRel . toModelObject <EOL> role = modelLabel . role <EOL> text = modelLabel . text <EOL> lang = modelLabel . xmlLang <EOL> if role == XbrlConst . documentationLabel : <EOL> if concept . modelDocument . targetNamespace in disclosureSystem . standardTaxonomiesDict : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelLabel , concept = concept . qname , text = text ) <EOL> elif text and lang and disclosureSystem . defaultXmlLang and lang . startswith ( disclosureSystem . defaultXmlLang ) : <EOL> if role == XbrlConst . standardLabel : <EOL> conceptHasDefaultLangStandardLabel = True <EOL> match = modelXbrl . modelManager . disclosureSystem . labelCheckPattern . search ( text ) <EOL> if match : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> '<STR_LIT>' , <EOL> modelObject = modelLabel , concept = concept . qname , role = role , text = match . group ( ) ) <EOL> for modelRefRel in referencesRelationshipSetWithProhibits . fromModelObject ( concept ) : <EOL> modelReference = modelRefRel . toModelObject <EOL> text = XmlUtil . innerText ( modelReference ) <EOL> if ( concept . modelDocument . targetNamespace in disclosureSystem . standardTaxonomiesDict and <EOL> not isStandardUri ( val , modelRefRel . modelDocument . uri ) ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelReference , concept = concept . qname , text = text , xml = XmlUtil . xmlstring ( modelReference , stripXmlns = True , contentsOnly = True ) ) <EOL> if concept . isItem or concept . isTuple : <EOL> if concept . modelDocument . targetNamespace not in disclosureSystem . standardTaxonomiesDict : <EOL> if not conceptHasDefaultLangStandardLabel : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = concept , concept = concept . qname ) <EOL> subsGroup = concept . get ( "<STR_LIT>" ) <EOL> if ( ( not concept . isAbstract or subsGroup == "<STR_LIT>" ) and <EOL> not ( presentationRelationshipSet . toModelObject ( concept ) or <EOL> presentationRelationshipSet . fromModelObject ( concept ) ) ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = concept , concept = concept . qname ) <EOL> elif ( ( concept . isDimensionItem or <EOL> ( subsGroup and ( subsGroup . endswith ( "<STR_LIT>" ) or subsGroup . endswith ( "<STR_LIT>" ) ) ) ) and <EOL> not ( presentationRelationshipSet . toModelObject ( concept ) or <EOL> presentationRelationshipSet . fromModelObject ( concept ) ) ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = concept , concept = concept . qname ) <EOL> if ( concept . substitutionGroupQname and <EOL> concept . substitutionGroupQname . namespaceURI not in disclosureSystem . baseTaxonomyNamespaces ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = concept , concept = concept . qname ) <EOL> if concept . isTuple : <EOL> for missingQname in set ( concept . type . elements ) ^ pLinkedNonAbstractDescendantQnames ( modelXbrl , concept ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = concept , concept = concept . qname , missingQname = missingQname ) <EOL> checkConceptLabels ( val , modelXbrl , labelsRelationshipSet , disclosureSystem , concept ) <EOL> checkConceptLabels ( val , modelXbrl , genLabelsRelationshipSet , disclosureSystem , concept ) <EOL> val . modelXbrl . profileActivity ( "<STR_LIT>" , minTimeToShow = <NUM_LIT:1.0> ) <EOL> checkFilingDTS ( val , modelXbrl . modelDocument , [ ] ) <EOL> '''<STR_LIT>''' <EOL> val . modelXbrl . profileActivity ( "<STR_LIT>" , minTimeToShow = <NUM_LIT:1.0> ) <EOL> conceptRelsUsedWithPreferredLabels = defaultdict ( list ) <EOL> usedCalcsPresented = defaultdict ( set ) <EOL> usedCalcFromTosELR = { } <EOL> localPreferredLabels = defaultdict ( set ) <EOL> drsELRs = set ( ) <EOL> val . summationItemRelsSetAllELRs = modelXbrl . relationshipSet ( XbrlConst . summationItem ) <EOL> for arcroleFilter in ( XbrlConst . summationItem , XbrlConst . parentChild , "<STR_LIT:*>" ) : <EOL> for baseSetKey , baseSetModelLinks in modelXbrl . baseSets . items ( ) : <EOL> arcrole , ELR , linkqname , arcqname = baseSetKey <EOL> if ELR and linkqname and arcqname and not arcrole . startswith ( "<STR_LIT>" ) : <EOL> if not ( arcroleFilter == arcrole or <EOL> arcroleFilter == "<STR_LIT:*>" and arcrole not in ( XbrlConst . summationItem , XbrlConst . parentChild ) ) : <EOL> continue <EOL> if arcrole == XbrlConst . parentChild : <EOL> ineffectiveArcs = ModelRelationshipSet . ineffectiveArcs ( baseSetModelLinks , arcrole ) <EOL> for modelRel in ineffectiveArcs : <EOL> if modelRel . fromModelObject is not None and modelRel . toModelObject is not None : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelRel , arc = modelRel . qname , arcrole = modelRel . arcrole , <EOL> linkrole = modelRel . linkrole , linkroleDefinition = modelXbrl . roleTypeDefinition ( modelRel . linkrole ) , <EOL> conceptFrom = modelRel . fromModelObject . qname , conceptTo = modelRel . toModelObject . qname , <EOL> ineffectivity = modelRel . ineffectivity ) <EOL> if arcrole == XbrlConst . parentChild : <EOL> isStatementSheet = any ( linkroleDefinitionStatementSheet . match ( roleType . definition or '<STR_LIT>' ) <EOL> for roleType in val . modelXbrl . roleTypes . get ( ELR , ( ) ) ) <EOL> conceptsPresented = set ( ) <EOL> parentChildRels = modelXbrl . relationshipSet ( arcrole , ELR ) <EOL> for relFrom , siblingRels in parentChildRels . fromModelObjects ( ) . items ( ) : <EOL> targetConceptPreferredLabels = defaultdict ( dict ) <EOL> orderRels = { } <EOL> firstRel = True <EOL> relFromUsed = True <EOL> for rel in siblingRels : <EOL> if firstRel : <EOL> firstRel = False <EOL> if relFrom in conceptsUsed : <EOL> conceptsUsed [ relFrom ] = True <EOL> relFromUsed = True <EOL> relTo = rel . toModelObject <EOL> preferredLabel = rel . preferredLabel <EOL> if relTo in conceptsUsed : <EOL> conceptsUsed [ relTo ] = True <EOL> if preferredLabel and preferredLabel != "<STR_LIT>" : <EOL> conceptRelsUsedWithPreferredLabels [ relTo ] . append ( rel ) <EOL> if preferredLabel in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , modelObject = modelRel ) <EOL> preferredLabels = targetConceptPreferredLabels [ relTo ] <EOL> if ( preferredLabel in preferredLabels or <EOL> ( not relFrom . isTuple and <EOL> ( not preferredLabel or None in preferredLabels ) ) ) : <EOL> if preferredLabel in preferredLabels : <EOL> rel2 , relTo2 = preferredLabels [ preferredLabel ] <EOL> else : <EOL> rel2 = relTo2 = None <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = ( rel , relTo , rel2 , relTo2 ) , <EOL> concept = relTo . qname , fromConcept = rel . fromModelObject . qname , <EOL> preferredLabel = preferredLabel , linkrole = rel . linkrole , linkroleDefinition = modelXbrl . roleTypeDefinition ( rel . linkrole ) ) <EOL> else : <EOL> preferredLabels [ preferredLabel ] = ( rel , relTo ) <EOL> if relFromUsed : <EOL> conceptsPresented . add ( relFrom . objectIndex ) <EOL> conceptsPresented . add ( relTo . objectIndex ) <EOL> order = rel . order <EOL> if order in orderRels : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = ( rel , orderRels [ order ] ) , conceptFrom = relFrom . qname , order = rel . arcElement . get ( "<STR_LIT>" ) , linkrole = rel . linkrole , linkroleDefinition = modelXbrl . roleTypeDefinition ( rel . linkrole ) , <EOL> conceptTo = rel . toModelObject . qname , conceptTo2 = orderRels [ order ] . toModelObject . qname ) <EOL> else : <EOL> orderRels [ order ] = rel <EOL> if not relFrom . isTuple : <EOL> if relTo in localPreferredLabels : <EOL> if { None , preferredLabel } & localPreferredLabels [ relTo ] : <EOL> val . modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = rel , conceptFrom = relFrom . qname , linkrole = rel . linkrole , conceptTo = relTo . qname ) <EOL> localPreferredLabels [ relTo ] . add ( preferredLabel ) <EOL> targetConceptPreferredLabels . clear ( ) <EOL> orderRels . clear ( ) <EOL> localPreferredLabels . clear ( ) <EOL> for conceptPresented in conceptsPresented : <EOL> if conceptPresented in usedCalcsPresented : <EOL> usedCalcPairingsOfConcept = usedCalcsPresented [ conceptPresented ] <EOL> if len ( usedCalcPairingsOfConcept & conceptsPresented ) > <NUM_LIT:0> : <EOL> usedCalcPairingsOfConcept -= conceptsPresented <EOL> elif arcrole == XbrlConst . summationItem : <EOL> for modelRel in val . modelXbrl . relationshipSet ( arcrole , ELR ) . modelRelationships : <EOL> val . modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelRel , linkrole = ELR ) <EOL> break <EOL> elif arcrole == XbrlConst . all or arcrole == XbrlConst . notAll : <EOL> drsELRs . add ( ELR ) <EOL> else : <EOL> if arcrole == XbrlConst . dimensionDefault : <EOL> for modelRel in val . modelXbrl . relationshipSet ( arcrole ) . modelRelationships : <EOL> val . modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelRel , conceptFrom = modelRel . fromModelObject . qname , conceptTo = modelRel . toModelObject . qname , <EOL> linkrole = modelRel . linkrole ) <EOL> '''<STR_LIT>''' <EOL> del localPreferredLabels <EOL> del usedCalcFromTosELR <EOL> del val . summationItemRelsSetAllELRs <EOL> val . modelXbrl . profileActivity ( "<STR_LIT>" , minTimeToShow = <NUM_LIT:1.0> ) <EOL> checkFilingDimensions ( val , drsELRs ) <EOL> val . modelXbrl . profileActivity ( "<STR_LIT>" , minTimeToShow = <NUM_LIT:1.0> ) <EOL> del conceptRelsUsedWithPreferredLabels <EOL> val . modelXbrl . profileActivity ( "<STR_LIT>" , minTimeToShow = <NUM_LIT:1.0> ) <EOL> for qname , modelType in modelXbrl . qnameTypes . items ( ) : <EOL> if qname . namespaceURI not in val . disclosureSystem . baseTaxonomyNamespaces : <EOL> facets = modelType . facets <EOL> if facets : <EOL> lengthFacets = _DICT_SET ( facets . keys ( ) ) & { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" } <EOL> if lengthFacets : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelType , typename = modelType . qname , facets = "<STR_LIT:U+002CU+0020>" . join ( lengthFacets ) ) <EOL> if "<STR_LIT>" in facets and not modelType . isDerivedFrom ( XbrlConst . qnXbrliStringItemType ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelType , concept = modelType . qname ) <EOL> '''<STR_LIT>''' <EOL> ordersRelationshipSet = modelXbrl . relationshipSet ( "<STR_LIT>" ) <EOL> presLinkroleNumberURI = { } <EOL> presLinkrolesCount = <NUM_LIT:0> <EOL> for countLinkroles in ( True , False ) : <EOL> for _roleURI , modelRoleTypes in modelXbrl . roleTypes . items ( ) : <EOL> for modelRoleType in modelRoleTypes : <EOL> if XbrlConst . qnLinkPresentationLink in modelRoleType . usedOns : <EOL> if countLinkroles : <EOL> presLinkrolesCount += <NUM_LIT:1> <EOL> else : <EOL> if not ordersRelationshipSet : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelRoleType , linkrole = modelRoleType . roleURI ) <EOL> else : <EOL> order = None <EOL> for orderNumRel in ordersRelationshipSet . fromModelObject ( modelRoleType ) : <EOL> order = getattr ( orderNumRel . toModelObject , "<STR_LIT>" , "<STR_LIT>" ) <EOL> if order in presLinkroleNumberURI : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelRoleType , order = order , linkrole = modelRoleType . roleURI , otherLinkrole = presLinkroleNumberURI [ order ] ) <EOL> else : <EOL> presLinkroleNumberURI [ order ] = modelRoleType . roleURI <EOL> if not order : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelRoleType , linkrole = modelRoleType . roleURI ) <EOL> if countLinkroles and presLinkrolesCount < <NUM_LIT:2> : <EOL> break <EOL> for arcroleURI , modelRoleTypes in modelXbrl . arcroleTypes . items ( ) : <EOL> for modelRoleType in modelRoleTypes : <EOL> if ( not arcroleURI . startswith ( "<STR_LIT>" ) and <EOL> modelRoleType . modelDocument . targetNamespace not in val . disclosureSystem . baseTaxonomyNamespaces and <EOL> ( not modelRoleType . genLabel ( lang = "<STR_LIT>" ) or not modelRoleType . genLabel ( lang = "<STR_LIT>" ) ) ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelRoleType , arcrole = arcroleURI ) <EOL> for domainElt in val . typedDomainElements : <EOL> if domainElt . modelDocument . targetNamespace not in val . disclosureSystem . baseTaxonomyNamespaces : <EOL> if not domainElt . genLabel ( fallbackToQname = False , lang = "<STR_LIT>" ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = domainElt , concept = domainElt . qname ) <EOL> if domainElt . type is not None and domainElt . type . localName == "<STR_LIT>" : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = domainElt , concept = domainElt . qname ) <EOL> modelXbrl . profileActivity ( "<STR_LIT>" , minTimeToShow = <NUM_LIT:1.0> ) <EOL> for docs in modelXbrl . namespaceDocs . values ( ) : <EOL> for doc in docs : <EOL> for prefix , NS in doc . xmlRootElement . nsmap . items ( ) : <EOL> if NS in val . namespacePrefix and prefix != val . namespacePrefix [ NS ] : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = doc . xmlRootElement , namespace = NS , assignedPrefix = val . namespacePrefix . get ( NS , '<STR_LIT>' ) , referencedPrefix = prefix ) <EOL> labelsRelationshipSet = modelXbrl . relationshipSet ( ( XbrlConst . conceptLabel , XbrlConst . elementLabel ) ) <EOL> baseTaxonomyNamespaces = val . disclosureSystem . baseTaxonomyNamespaces <EOL> for eltDef in modelXbrl . qnameConcepts . values ( ) : <EOL> if ( not ( eltDef . isItem or eltDef . isTuple or eltDef . isLinkPart ) and <EOL> eltDef . qname . namespaceURI not in baseTaxonomyNamespaces ) : <EOL> eltDefHasDefaultLangStandardLabel = False <EOL> for modelLabelRel in labelsRelationshipSet . fromModelObject ( eltDef ) : <EOL> modelLabel = modelLabelRel . toModelObject <EOL> role = modelLabel . role <EOL> text = modelLabel . text <EOL> lang = modelLabel . xmlLang <EOL> if text and lang and val . disclosureSystem . defaultXmlLang and lang . startswith ( val . disclosureSystem . defaultXmlLang ) : <EOL> if role in ( XbrlConst . standardLabel , XbrlConst . genStandardLabel ) : <EOL> eltDefHasDefaultLangStandardLabel = True <EOL> if not eltDefHasDefaultLangStandardLabel : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = eltDef , element = eltDef . qname ) <EOL> val . modelXbrl . profileStat ( _ ( "<STR_LIT>" ) . format ( modelXbrl . modelManager . disclosureSystem . validationType ) ) <EOL> modelXbrl . modelManager . showStatus ( _ ( "<STR_LIT>" ) , <NUM_LIT> ) <EOL> def isStandardUri ( val , uri ) : <EOL> try : <EOL> return val . _isStandardUri [ uri ] <EOL> except KeyError : <EOL> isStd = ( uri in val . disclosureSystem . standardTaxonomiesDict or <EOL> ( not isHttpUrl ( uri ) and <EOL> "<STR_LIT>" in uri . replace ( "<STR_LIT:\\>" , "<STR_LIT:/>" ) <EOL> ) ) <EOL> val . _isStandardUri [ uri ] = isStd <EOL> return isStd <EOL> def checkConceptLabels ( val , modelXbrl , labelsRelationshipSet , disclosureSystem , concept ) : <EOL> hasDefaultLangStandardLabel = False <EOL> dupLabels = { } <EOL> for modelLabelRel in labelsRelationshipSet . fromModelObject ( concept ) : <EOL> modelLabel = modelLabelRel . toModelObject <EOL> if modelLabel is not None and modelLabel . xmlLang : <EOL> if modelLabel . xmlLang . startswith ( disclosureSystem . defaultXmlLang ) and modelLabel . role == XbrlConst . standardLabel : <EOL> hasDefaultLangStandardLabel = True <EOL> dupDetectKey = ( ( modelLabel . role or '<STR_LIT>' ) , modelLabel . xmlLang ) <EOL> if dupDetectKey in dupLabels : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = ( modelLabel , dupLabels [ dupDetectKey ] ) , <EOL> concept = concept . qname , role = dupDetectKey [ <NUM_LIT:0> ] , lang = dupDetectKey [ <NUM_LIT:1> ] ) <EOL> else : <EOL> dupLabels [ dupDetectKey ] = modelLabel <EOL> if modelLabel . role in ( XbrlConst . periodStartLabel , XbrlConst . periodEndLabel ) : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = modelLabel , concept = concept . qname , role = modelLabel . role ) <EOL> for role , lang in dupLabels . keys ( ) : <EOL> if role and lang != disclosureSystem . defaultXmlLang and ( role , disclosureSystem . defaultXmlLang ) not in dupLabels : <EOL> modelXbrl . error ( "<STR_LIT>" , <EOL> _ ( "<STR_LIT>" ) , <EOL> modelObject = ( concept , dupLabels [ ( role , lang ) ] ) , concept = concept . qname , role = role ) <EOL> def pLinkedNonAbstractDescendantQnames ( modelXbrl , concept , descendants = None ) : <EOL> if descendants is None : descendants = set ( ) <EOL> for rel in modelXbrl . relationshipSet ( XbrlConst . parentChild ) . fromModelObject ( concept ) : <EOL> child = rel . toModelObject <EOL> if child is not None : <EOL> if child . isAbstract : <EOL> pLinkedNonAbstractDescendantQnames ( modelXbrl , child , descendants ) <EOL> else : <EOL> descendants . add ( child . qname ) <EOL> return descendants </s>
