def repr_tree(<EOL>self,<EOL>ids=False,<EOL>include_linenos=False,<EOL>ast_state=False,<EOL>indent="<STR_LIT:U+0020>",<EOL>max_depth=<NUM_LIT:0>,<EOL>max_width=<NUM_LIT>,<EOL>):
<EOL>@_singledispatch<EOL>def _repr_tree(node, result, done, cur_indent="<STR_LIT>", depth=<NUM_LIT:1>):<EOL><INDENT>"""<STR_LIT>"""<EOL>lines = pprint.pformat(<EOL>node, width=max(max_width - len(cur_indent), <NUM_LIT:1>)<EOL>).splitlines(True)<EOL>result.append(lines[<NUM_LIT:0>])<EOL>result.extend([cur_indent + line for line in lines[<NUM_LIT:1>:]])<EOL>return len(lines) != <NUM_LIT:1><EOL><DEDENT>@_repr_tree.register(tuple)<EOL>@_repr_tree.register(list)<EOL>def _repr_seq(node, result, done, cur_indent="<STR_LIT>", depth=<NUM_LIT:1>):<EOL><INDENT>"""<STR_LIT>"""<EOL>cur_indent += indent<EOL>result.append("<STR_LIT:[>")<EOL>if not node:<EOL><INDENT>broken = False<EOL><DEDENT>elif len(node) == <NUM_LIT:1>:<EOL><INDENT>broken = _repr_tree(node[<NUM_LIT:0>], result, done, cur_indent, depth)<EOL><DEDENT>elif len(node) == <NUM_LIT:2>:<EOL><INDENT>broken = _repr_tree(node[<NUM_LIT:0>], result, done, cur_indent, depth)<EOL>if not broken:<EOL><INDENT>result.append("<STR_LIT:U+002CU+0020>")<EOL><DEDENT>else:<EOL><INDENT>result.append("<STR_LIT>")<EOL>result.append(cur_indent)<EOL><DEDENT>broken = _repr_tree(node[<NUM_LIT:1>], result, done, cur_indent, depth) or broken<EOL><DEDENT>else:<EOL><INDENT>result.append("<STR_LIT:\n>")<EOL>result.append(cur_indent)<EOL>for child in node[:-<NUM_LIT:1>]:<EOL><INDENT>_repr_tree(child, result, done, cur_indent, depth)<EOL>result.append("<STR_LIT>")<EOL>result.append(cur_indent)<EOL><DEDENT>_repr_tree(node[-<NUM_LIT:1>], result, done, cur_indent, depth)<EOL>broken = True<EOL><DEDENT>result.append("<STR_LIT:]>")<EOL>return broken<EOL><DEDENT>@_repr_tree.register(NodeNG)<EOL>def _repr_node(node, result, done, cur_indent="<STR_LIT>", depth=<NUM_LIT:1>):<EOL><INDENT>"""<STR_LIT>"""<EOL>if node in done:<EOL><INDENT>result.append(<EOL>indent<EOL>+ "<STR_LIT>" % (type(node).__name__, id(node))<EOL>)<EOL>return False<EOL><DEDENT>done.add(node)<EOL>if max_depth and depth > max_depth:<EOL><INDENT>result.append("<STR_LIT>")<EOL>return False<EOL><DEDENT>depth += <NUM_LIT:1><EOL>cur_indent += indent<EOL>if ids:<EOL><INDENT>result.append("<STR_LIT>" % (type(node).__name__, id(node)))<EOL><DEDENT>else:<EOL><INDENT>result.append("<STR_LIT>" % type(node).__name__)<EOL><DEDENT>fields = []<EOL>if include_linenos:<EOL><INDENT>fields.extend(("<STR_LIT>", "<STR_LIT>"))<EOL><DEDENT>fields.extend(node._other_fields)<EOL>fields.extend(node._astroid_fields)<EOL>if ast_state:<EOL><INDENT>fields.extend(node._other_other_fields)<EOL><DEDENT>if not fields:<EOL><INDENT>broken = False<EOL><DEDENT>elif len(fields) == <NUM_LIT:1>:<EOL><INDENT>result.append("<STR_LIT>" % fields[<NUM_LIT:0>])<EOL>broken = _repr_tree(<EOL>getattr(node, fields[<NUM_LIT:0>]), result, done, cur_indent, depth<EOL>)<EOL><DEDENT>else:<EOL><INDENT>result.append("<STR_LIT:\n>")<EOL>result.append(cur_indent)<EOL>for field in fields[:-<NUM_LIT:1>]:<EOL><INDENT>result.append("<STR_LIT>" % field)<EOL>_repr_tree(getattr(node, field), result, done, cur_indent, depth)<EOL>result.append("<STR_LIT>")<EOL>result.append(cur_indent)<EOL><DEDENT>result.append("<STR_LIT>" % fields[-<NUM_LIT:1>])<EOL>_repr_tree(getattr(node, fields[-<NUM_LIT:1>]), result, done, cur_indent, depth)<EOL>broken = True<EOL><DEDENT>result.append("<STR_LIT:)>")<EOL>return broken<EOL><DEDENT>result = []<EOL>_repr_tree(self, result, set())<EOL>return "<STR_LIT>".join(result)<EOL>
Get a string representation of the AST from this node.

        :param ids: If true, includes the ids with the node type names.
        :type ids: bool

        :param include_linenos: If true, includes the line numbers and
            column offsets.
        :type include_linenos: bool

        :param ast_state: If true, includes information derived from
            the whole AST like local and global variables.
        :type ast_state: bool

        :param indent: A string to use to indent the output string.
        :type indent: str

        :param max_depth: If set to a positive integer, won't return
            nodes deeper than max_depth in the string.
        :type max_depth: int

        :param max_width: Attempt to format the output string to stay
            within this number of characters, but can exceed it under some
            circumstances. Only positive integer values are valid, the default is 80.
        :type max_width: int

        :returns: The string representation of the AST.
        :rtype: str