

def identifier(self, node, plug):
    if node.isAncestorOf(plug):
        relativeName = plug.relativeName(node)
    else:
        relativeName = plug.relativeName(node.parent())
    return ('parent' + ''.join([('["%s"]' % n) for n in relativeName.split('.')]))

dataset/ETHPy150Open ImageEngine/gaffer/python/Gaffer/PythonExpressionEngine.py PythonExpressionEngine.identifier/original