def METHOD_NAME(dts, parentElt, concept, preferredLabel, arcrole, relationshipSet, visited):
    try:
        if concept is not None:
            attrs = {"name": str(concept.qname),
                     "label": concept.label(preferredLabel,linkroleHint=relationshipSet.linkrole),
                     "prefix": concept.qname.prefix}
            if concept.isHypercubeItem:
                tag = "Table"
            elif concept.isDimensionItem:
                tag = "Axis"
            elif concept.name.endswith("Domain"):
                tag = "Domain"
            elif concept.name.endswith("Member"):
                tag = "Member"
            else:
                if concept.name.endswith("LineItems"):
                    tag = "LineItems"
                else:
                    tag = "Concept"
                attrs["dataType"] = str(concept.type.qname)
                attrs["baseDataType"] = str(xbrliType(concept.type))
                attrs["abstract"] = str(concept.isAbstract).lower()
                attrs["periodType"] = concept.periodType
            elt = etree.SubElement(parentElt, tag, attrib=attrs)
            if concept not in visited:
                visited.add(concept)
                for modelRel in relationshipSet.fromModelObject(concept):
                    METHOD_NAME(dts, elt, modelRel.toModelObject, modelRel.preferredLabel, arcrole, relationshipSet, visited)
                visited.remove(concept)
    except AttributeError: #  bad relationship
        return