prepareTree = (node, parent, scope, traversalContext, { haltCondition } = {}) => {
    if (!node?.type) {
      return;
    }

    const { newOrCurScope } = handlePathAndScope(node, parent, scope, false, traversalContext);
    loopChildren({ node }, ({ child }) => {
      prepareTree(child, node, newOrCurScope, traversalContext, { haltCondition });
    });
  }
@param {SwcNode} node
@param {SwcNode|null} parent
@param {SwcScope} scope
@param {SwcTraversalContext} traversalContext
@param {{haltCondition?: (node: SwcNode) => boolean;}} [config]