handlePathAndScope = (node, parent, scope, hasPreparedTree, traversalContext) => {
    if (hasPreparedTree) {
      const swcPath = /** @type {SwcPath} */ (swcPathCache.get(node));
      return {
        swcPath,
        newOrCurScope: getNewScope(swcPath, scope, traversalContext) || scope,
      };
    }
    // `needsAdvancedPaths` was false
    const swcPath = createSwcPath(node, parent, stop);
    // We create scopes ourselves, since paths are not prepared yet...
    const newOrCurScope = getNewScope(swcPath, scope, traversalContext) || scope;
    swcPath.scope = newOrCurScope;
    addPotentialBindingOrRefToScope(swcPath);
    return { swcPath, newOrCurScope };
  }
@param {SwcNode} node
@param {SwcNode|null} parent
@param {SwcScope} scope
@param {boolean} hasPreparedTree
@param {SwcTraversalContext} traversalContext