import ast def process(node): ast.addSymbolIfNotPresent( node.name ) return node.name