def _parse_tree(_where):
            if isinstance(_where, tuple):
                return self._decode_child(_where)

            node = ParseNode(_where)

            for child in _where.children:
                if isinstance(child, Node) and child.children:
                    if len(child.children) == 1:
                        next_level = _parse_tree(child.children[0])
                    else:
                        next_level = _parse_tree(child)
                else:
                    next_level = self._decode_child(child)

                node.children.append(next_level)

            return node