from __future__ import print_function, division


def pprint_nodes(subtrees):
    """
    Prettyprints systems of nodes.

    Examples
    ========

    >>> from sympy.printing.tree import pprint_nodes
    >>> print(pprint_nodes(["a", "b1\\nb2", "c"]))
    +-a
    +-b1
    | b2
    +-c

    """
    def indent(s, type=1):
        x = s.split("\n")
        r = "+-%s\n" % x[0]
        for a in x[1:]:
            if a == "":
                continue
            if type == 1:
                r += "| %s\n" % a
            else:
                r += "  %s\n" % a
        return r
    if len(subtrees) == 0:
        return ""
    f = ""
    for a in subtrees[:-1]:
        f += indent(a)
    f += indent(subtrees[-1], 2)
    return f


def print_node(node):
    """
    Returns an information about the "node".

    This includes class name, string representation and assumptions.
    """
    s = "%s: %s\n" % (node.__class__.__name__, str(node))
    d = node._assumptions
    if len(d) > 0:
        for a in sorted(d):
            v = d[a]
            if v is None:
                continue
            s += "%s: %s\n" % (a, v)
    return s


def tree(node):
    """
    Returns a tree representation of "node" as a string.

    It uses print_node() together with pprint_nodes() on node.args recursively.

    See also: print_tree()
    """
    subtrees = []
    for arg in node.args:
        subtrees.append(tree(arg))
    s = print_node(node) + pprint_nodes(subtrees)
    return s


def print_tree(node):
    """
    Prints a tree representation of "node".

    Examples
    ========

    >>> from sympy.printing import print_tree
    >>> from sympy.abc import x
    >>> print_tree(x**2)
    Pow: x**2
    +-Symbol: x
    | commutative: True
    +-Integer: 2
      algebraic: True
      commutative: True
      complex: True
      hermitian: True
      imaginary: False
      integer: True
      irrational: False
      negative: False
      noninteger: False
      nonnegative: True
      nonpositive: False
      nonzero: True
      positive: True
      rational: True
      real: True
      transcendental: False
      zero: False

    See also: tree()
    """
    print(tree(node))

@@ -773,11 +773,8 @@
 rns 
-an 
 info
@@ -1644,20 +1644,16 @@
 ympy
-.abc
  import 
 x%0A  
@@ -1648,17 +1648,91 @@
  import 
-x
+Symbol%0A    %3E%3E%3E x = Symbol('x', odd=True)%0A    %3E%3E%3E y = Symbol('y', even=True)
 %0A    %3E%3E%3E
@@ -1743,20 +1743,20 @@
 nt_tree(
-x**2
+y**x
 )%0A    Po
@@ -1762,12 +1762,12 @@
 ow: 
-x**2
+y**x
 %0A   
@@ -1777,17 +1777,39 @@
 Symbol: 
-x
+y%0A    %7C algebraic: True
 %0A    %7C c
@@ -1833,20 +1833,252 @@
     
-+-Integer: 2
+%7C complex: True%0A    %7C even: True%0A    %7C hermitian: True%0A    %7C imaginary: False%0A    %7C integer: True%0A    %7C irrational: False%0A    %7C noninteger: False%0A    %7C odd: False%0A    %7C rational: True%0A    %7C real: True%0A    %7C transcendental: False%0A    +-Symbol: x
 %0A   
@@ -2136,24 +2136,42 @@
 mplex: True%0A
+      even: False%0A
       hermit
@@ -2251,30 +2251,8 @@
 lse%0A
-      negative: False%0A
     
@@ -2275,57 +2275,8 @@
 lse%0A
-      nonnegative: True%0A      nonpositive: False%0A
     
@@ -2301,16 +2301,11 @@
     
-positive
+odd
 : Tr

use two symbols