def new(n, prefix=None):
if isinstance(n, Leaf):<EOL><INDENT>return Leaf(n.type, n.value, prefix=n.prefix if prefix is None else prefix)<EOL><DEDENT>n.parent = None<EOL>if prefix is not None:<EOL><INDENT>n.prefix = prefix<EOL><DEDENT>return n<EOL>
lib2to3's AST requires unique objects as children.