Generates a dictionary representation of the given :class:`CTENode`
        `node`, which consists of the node itself under the key ``node``, as
        well as structural information under the keys ``depth``, ``path``,
        ``ordering``, ``leaf``, and ``branch``.

        :param node: the :class:`CTENode` for which to generate the
            representation.

        :return: a dictionary representation of the structure of the node.

def _default_node_visitor(self, node):
        """ Generates a dictionary representation of the given :class:`CTENode`
        `node`, which consists of the node itself under the key ``node``, as
        well as structural information under the keys ``depth``, ``path``,
        ``ordering``, ``leaf``, and ``branch``.

        :param node: the :class:`CTENode` for which to generate the
            representation.

        :return: a dictionary representation of the structure of the node.
        """
        return {
            "depth": getattr(node, node._cte_node_depth),
            "path": [str(c) for c in getattr(node, node._cte_node_path)],
            "ordering": getattr(node, node._cte_node_ordering),
            "leaf": node.is_leaf(),
            "branch": node.is_branch(),
            "node": node,
        }