def getInheritance( mayaType, checkManip3D=True ):
    from . import apicache
    import pymel.api as api
    
    if versions.current() >= versions.v2012:
        # We now have nodeType(isTypeName)! yay!
        kwargs = dict(isTypeName=True, inherited=True)
        lineage = cmds.nodeType(mayaType, **kwargs)
        if lineage is None:
            controlPoint = cmds.nodeType('controlPoint', **kwargs)
            # For whatever reason, nodeType(isTypeName) returns
            # None for the following mayaTypes:
            fixedLineages = {
                'file':[u'texture2d', u'file'],
                'lattice':controlPoint + [u'lattice'],
                'mesh':controlPoint + [u'surfaceShape', u'mesh'],
                'nurbsCurve':controlPoint + [u'curveShape', u'nurbsCurve'],
                'nurbsSurface':controlPoint + [u'surfaceShape', u'nurbsSurface'],
                'time':[u'time']
            }
            if mayaType in fixedLineages:
                lineage = fixedLineages[mayaType]
            else:
                raise RuntimeError("Could not query the inheritance of node type %s" % mayaType)
        elif checkManip3D and 'manip3D' in lineage:
            raise ManipNodeTypeError
        assert lineage[-1] == mayaType
    else:
        dagMod = api.MDagModifier()
        dgMod = api.MDGModifier()
    
        obj = apicache._makeDgModGhostObject(mayaType, dagMod, dgMod)
    
        lineage = []
        if obj is not None:
            if (      obj.hasFn( api.MFn.kManipulator )      
                   or obj.hasFn( api.MFn.kManipContainer )
                   or obj.hasFn( api.MFn.kPluginManipContainer )
                   or obj.hasFn( api.MFn.kPluginManipulatorNode )
                   
                   or obj.hasFn( api.MFn.kManipulator2D )
                   or obj.hasFn( api.MFn.kManipulator3D )
                   or obj.hasFn( api.MFn.kManip2DContainer) ):
                raise ManipNodeTypeError
     
            if obj.hasFn( api.MFn.kDagNode ):
                mod = dagMod
                mod.doIt()
                name = api.MFnDagNode(obj).partialPathName()
            else:
                mod = dgMod
                mod.doIt()
                name = api.MFnDependencyNode(obj).name()
        
            if not obj.isNull() and not obj.hasFn( api.MFn.kManipulator3D ) and not obj.hasFn( api.MFn.kManipulator2D ):
                lineage = cmds.nodeType( name, inherited=1)
            mod.undoIt()
    return lineage
Get parents as a list, starting from the node after dependNode, and
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/internal/cmdcache.py/getInheritance