def match_hierarchy(source, target):
    source_nodes = source.listRelatives(
        ad=1,
        type=(pm.nt.Mesh, pm.nt.NurbsSurface)
    )
    target_nodes = target.listRelatives(
        ad=1,
        type=(pm.nt.Mesh, pm.nt.NurbsSurface)
    )

    source_node_names = []
    target_node_names = []

    lut = {
        'match': [],
        'no_match': []
    }
    for node in source_nodes:
        name = node.name().split(':')[-1].split('|')[-1]
        source_node_names.append(name)

    for node in target_nodes:
        name = node.name().split(':')[-1].split('|')[-1]
        target_node_names.append(name)

    for i, target_node in enumerate(target_nodes):
        target_node_name = target_node_names[i]
        try:
            tmp_target_node_name = target_node_name
            if target_node_name.endswith('Deformed'):
                tmp_target_node_name = \
                    target_node_name.replace('Deformed', '')
            index = source_node_names.index(tmp_target_node_name)
        except ValueError:
            lut['no_match'].append(target_node)
        else:
            lut['match'].append((source_nodes[index], target_nodes[i]))

    return lut
Adds the provided file to the list to be pushed to the server.
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/auxiliary.py/match_hierarchy--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/appcfg.py/AppVersionUpload.AddFile