@staticmethod<EOL><INDENT>def check_as_string_ast_equality(code):<DEDENT>
pre = builder.parse(code)<EOL>post = builder.parse(pre.as_string())<EOL>pre_repr = pre.repr_tree()<EOL>post_repr = post.repr_tree()<EOL>assert pre_repr == post_repr<EOL>assert pre.as_string().strip() == code.strip()<EOL>
Check that as_string produces source code with exactly the same
semantics as the source it was originally parsed from