def dump_ast(ast, indent=' ', newline='\n'):
    '''
    
    Returns a string representing the ast.
    
    :param ast: the ast to print.
    :param indent: how far to indent a newline.
    :param newline: The newline character.
    
    '''
    
    visitor = ASTPrinter(indent=indent, level=0, newline=newline)
    visitor.visit(ast)
    return visitor.dumps()
def dump_ast ( ast , indent = ' ' , newline = '\n' ) : visitor = ASTPrinter ( indent = indent , level = 0 , newline = newline ) visitor . visit ( ast ) return visitor . dumps ( )
Returns a string representing the ast.
    
    :param ast: the ast to print.
    :param indent: how far to indent a newline.
    :param newline: The newline character.