build_tree
xorq.common.utils.lineage_utils.build_tree(
node,
*,
palette=None,
dedup=True,
max_depth=None,
)Build a visual tree representation of a lineage node.
Creates a Rich Tree object that can be displayed or printed to visualize the structure of a GenericNode and its children.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| node | GenericNode | The root node to build the tree from. | required |
| palette | ColorScheme | None | Optional color scheme for styling the tree nodes. | None |
| dedup | bool | If True, deduplicate identical nodes and show references. | True |
| max_depth | int | None | Maximum depth to render. Nodes beyond this depth are shown as “…”. | None |
Returns
| Name | Type | Description |
|---|---|---|
| Tree | A Rich Tree object representing the lineage structure. |