async function walk({
  moduleSpecifier,
  importHook,
  visitorFn,
  shouldImport,
  visitedSpecifiers,
}) {
  for await (const moduleRecord of eachNodeInTree({
    moduleSpecifier,
    importHook,
    shouldImport,
    visitedSpecifiers,
  })) {
    // walk next record
    visitorFn(moduleRecord)
  }
}
@param {object} options
@param {string} options.moduleSpecifier
@param {import('./parseForPolicy').ImportHookFn} options.importHook
@param {VisitorFn} options.visitorFn
@param {import('./parseForPolicy').ShouldImportFn} options.shouldImport
@param {Set<string>} [options.visitedSpecifiers]