

def __path(self, node):
    result = []
    while (node is not None):
        if isinstance(node, ast.Subscript):
            if isinstance(node.slice, ast.Index):
                if isinstance(node.slice.value, ast.Str):
                    result.insert(0, node.slice.value.s)
                else:
                    return []
            node = node.value
        elif isinstance(node, ast.Name):
            result.insert(0, node.id)
            node = None
        else:
            return []
    return result

dataset/ETHPy150Open ImageEngine/gaffer/python/Gaffer/PythonExpressionEngine.py _Parser.__path/original