def getName(self, obj):
        name = obj.nodeName()

        if obj.isInstanced():
            if isinstance(obj, core.nt.Transform):
                # keep transforms bolded
                color = self.colors['nonunique_transform']
            else:
                color = self.colors['nonunique']
            id = obj.instanceNumber()
            if id != 0:
                source = ' -> %s' % obj.getOtherInstances()[0]
            else:
                source = ''
            name = color + name + self.colors['instance'] + ' [' + str(id) + ']' + source
        elif not obj.isUniquelyNamed():
            if isinstance(obj, core.nt.Transform):
                # keep transforms bolded
                color = self.colors['nonunique_transform']
            else:
                color = self.colors['nonunique']
            name = color + name
        elif isinstance(obj, core.nt.Transform):
            # bold
            name = self.colors['transform'] + name
        else:
            name = self.colors['shape'] + name

        return name
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/tools/ipymel.py/DagTree.getName/original