def _PytreeNodeRepr(node):
 if isinstance(node, pytree.Node):
  return ('%s(%s, %r)' % (node.__class__.__name__, NodeName(node), [_PytreeNodeRepr(c) for c in node.children]))
 if isinstance(node, pytree.Leaf):
  return ('%s(%s, %r)' % (node.__class__.__name__, NodeName(node), node.value))

def _PytreeNodeRepr ( node ) : if isinstance ( node , pytree . Node ) : return ( '%s(%s, %r)' % ( node . __class__ . __name__ , NodeName ( node ) , [ _PytreeNodeRepr ( c ) for c in node . children ] ) ) if isinstance ( node , pytree . Leaf ) : return ( '%s(%s, %r)' % ( node . __class__ . __name__ , NodeName ( node ) , node . value ) )
like pytree .