def transform_ast(self, node):
    "Apply the AST transformations from self.ast_transformers\n\n        Parameters\n        ----------\n        node : ast.Node\n            The root node to be transformed. Typically called with the ast.Module\n            produced by parsing user input.\n\n        Returns\n        -------\n        An ast.Node corresponding to the node it was called with. Note that it\n        may also modify the passed object, so don't rely on references to the\n        original AST.\n        "
    for transformer in self.ast_transformers:
        try:
            node = transformer.visit(node)
        except InputRejected:
            raise
        except Exception:
            warn(('AST transformer %r threw an error. It will be unregistered.' % transformer))
            self.ast_transformers.remove(transformer)
    if self.ast_transformers:
        ast.fix_missing_locations(node)
    return node
Apply the AST transformations from self.ast_transformers

Parameters
----------
node : ast.Node
    The root node to be transformed. Typically called with the ast.Module
    produced by parsing user input.

Returns
-------
An ast.Node corresponding to the node it was called with. Note that it
may also modify the passed object, so don't rely on references to the
original AST.
def transform_ast(self, node):
    "Apply the AST transformations from self.ast_transformers\n\n        Parameters\n        ----------\n        node : ast.Node\n            The root node to be transformed. Typically called with the ast.Module\n            produced by parsing user input.\n\n        Returns\n        -------\n        An ast.Node corresponding to the node it was called with. Note that it\n        may also modify the passed object, so don't rely on references to the\n        original AST.\n        "
    for transformer in self.ast_transformers:
        try:
            node = transformer.visit(node)
        except InputRejected:
            raise
        except Exception:
            warn(('AST transformer %r threw an error. It will be unregistered.' % transformer))
            self.ast_transformers.remove(transformer)
    if self.ast_transformers:
        ast.fix_missing_locations(node)
    return node