pipeline.walk_swap
def walk_swap(root: object, registry: SoftRegistry) -> objectReplace nodes in the stage tree by structural recursion.
Uses :func:`dataclasses.replace` to preserve frozen-dataclass
immutability.
Parameters
| Name | Type | Description |
|---|---|---|
| root | object | Stage-tree root. |
| registry | SoftRegistry | Hard-to-soft factory table. |
Returns
object — New root with all replaceable nodes swapped.
Source: unitrack/pipeline/diff.py:191