

def viewFacts(self, modelFacts, parentNode, n):
    for modelFact in modelFacts:
        try:
            concept = modelFact.concept
            if (concept is not None):
                lbl = concept.label(self.labelrole, lang=self.lang, linkroleHint=XbrlConst.defaultLinkRole)
                objectIds = (modelFact.objectId(), concept.objectId())
            else:
                lbl = (modelFact.qname or modelFact.prefixedName)
                objectIds = modelFact.objectId()
            node = self.treeView.insert(parentNode, 'end', modelFact.objectId(self.id), text=lbl, tags=(('odd' if (n & 1) else 'even'),))
            for tag in objectIds:
                self.tag_has.setdefault(tag, []).append(node)
            self.treeView.set(node, 'sequence', str(self.id))
            if ((concept is not None) and (not modelFact.concept.isTuple)):
                self.treeView.set(n, 'contextID', modelFact.contextID)
                if modelFact.unitID:
                    self.treeView.set(node, 'unitID', (modelFact.unitID if self.unitDisplayID else modelFact.unit.value))
                self.treeView.set(node, 'decimals', modelFact.decimals)
                self.treeView.set(node, 'precision', modelFact.precision)
                self.treeView.set(node, 'language', modelFact.xmlLang)
                if self.footnotesRelationshipSet.fromModelObject(modelFact):
                    self.treeView.set(node, 'footnoted', '*')
                self.treeView.set(node, 'value', modelFact.effectiveValue.strip())
            self.id += 1
            n += 1
            self.viewFacts(modelFact.modelTupleFacts, node, n)
        except AttributeError:
            pass
        except:
            raise

dataset/ETHPy150Open Arelle/Arelle/arelle/ViewWinFactList.py ViewFactList.viewFacts/VarMisuse@221/281 `node`->`n`